branch 3784-hibernate5 updated (a34f43f -> 45deac9)
This is an automated email from the git hooks/post-receive script. New change to branch 3784-hibernate5 in repository topia-2.x. See http://git.nuiton.org/topia-2.x.git from a34f43f refs #3784: Update to hibernate 5.1 new 45deac9 refs #3784: readd updateSchema method The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 45deac9c74268797b3dc9d28340ee03c9cfa6e1c Author: Eric Chatellier <chatellier@codelutin.com> Date: Mon Feb 22 17:04:50 2016 +0100 refs #3784: readd updateSchema method Summary of changes: .../src/main/java/org/nuiton/topia/TopiaContext.java | 7 +++++++ .../org/nuiton/topia/framework/TopiaContextImpl.java | 17 +++++++++++++++++ 2 files changed, 24 insertions(+) -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch 3784-hibernate5 in repository topia-2.x. See http://git.nuiton.org/topia-2.x.git commit 45deac9c74268797b3dc9d28340ee03c9cfa6e1c Author: Eric Chatellier <chatellier@codelutin.com> Date: Mon Feb 22 17:04:50 2016 +0100 refs #3784: readd updateSchema method --- .../src/main/java/org/nuiton/topia/TopiaContext.java | 7 +++++++ .../org/nuiton/topia/framework/TopiaContextImpl.java | 17 +++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/topia-persistence/src/main/java/org/nuiton/topia/TopiaContext.java b/topia-persistence/src/main/java/org/nuiton/topia/TopiaContext.java index b6799a4..e4ef10b 100644 --- a/topia-persistence/src/main/java/org/nuiton/topia/TopiaContext.java +++ b/topia-persistence/src/main/java/org/nuiton/topia/TopiaContext.java @@ -136,6 +136,13 @@ public interface TopiaContext { void showCreateSchema() throws TopiaException; /** + * Permet de mettre à jour le schema de la base de données. + * + * @throws TopiaException if any exception + */ + void updateSchema() throws TopiaException; + + /** * Return a new context containing his own transaction. * * @return new context with transaction diff --git a/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImpl.java b/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImpl.java index 075d7d1..749f569 100644 --- a/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImpl.java +++ b/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImpl.java @@ -465,6 +465,23 @@ public class TopiaContextImpl implements TopiaContextImplementor { eee.getMessage()), eee); } } + + @Override + public void updateSchema() throws TopiaException { + try { + EnumSet<TargetType> targetTypes = EnumSet.of(TargetType.DATABASE); + if (log.isDebugEnabled()) { + targetTypes = EnumSet.of(TargetType.DATABASE, TargetType.STDOUT); + } + getFiresSupport().firePreUpdateSchema(this); + new SchemaUpdate().execute(targetTypes, getMetadata()); + getFiresSupport().firePostUpdateSchema(this); + } catch (HibernateException eee) { + throw new TopiaException( + t("topia.persistence.error.update.schema", + eee.getMessage()), eee); + } + } @Override public void showCreateSchema() throws TopiaException { -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
participants (1)
-
nuiton.org scm