[topia] branch develop updated (3df0dab -> 4eaa899)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository topia. See http://git.nuiton.org/topia.git from 3df0dab To ensure backward compatibility, we must first allow user to generate even if validation fail (refs #3487) new 4eaa899 fixes #3494 Do not generate DDL INDEX when entity is abstract 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 4eaa899ea47e4ad61788d7bfe107c58714f9199c Author: Arnaud Thimel <thimel@codelutin.com> Date: Wed Sep 3 17:58:08 2014 +0200 fixes #3494 Do not generate DDL INDEX when entity is abstract Summary of changes: .../topia/templates/EntityHibernateMappingGenerator.java | 7 ++++--- .../java/org/nuiton/topia/templates/TopiaTemplateHelper.java | 12 ++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) -- 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 develop in repository topia. See http://git.nuiton.org/topia.git commit 4eaa899ea47e4ad61788d7bfe107c58714f9199c Author: Arnaud Thimel <thimel@codelutin.com> Date: Wed Sep 3 17:58:08 2014 +0200 fixes #3494 Do not generate DDL INDEX when entity is abstract --- .../topia/templates/EntityHibernateMappingGenerator.java | 7 ++++--- .../java/org/nuiton/topia/templates/TopiaTemplateHelper.java | 12 ++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/topia-templates/src/main/java/org/nuiton/topia/templates/EntityHibernateMappingGenerator.java b/topia-templates/src/main/java/org/nuiton/topia/templates/EntityHibernateMappingGenerator.java index 9d503a6..4a873fd 100644 --- a/topia-templates/src/main/java/org/nuiton/topia/templates/EntityHibernateMappingGenerator.java +++ b/topia-templates/src/main/java/org/nuiton/topia/templates/EntityHibernateMappingGenerator.java @@ -244,10 +244,11 @@ public class EntityHibernateMappingGenerator extends ObjectModelGenerator { for (ObjectModelAttribute attribute : attributes) { if (!attribute.isNavigable() || - attribute.hasAssociationClass() || - !GeneratorUtil.isNMultiplicity(attribute) || + attribute.hasAssociationClass() || + !GeneratorUtil.isNMultiplicity(attribute) || attribute.getClassifier() == null || - !templateHelper.isEntity(attribute.getClassifier()) + !templateHelper.isEntity(attribute.getClassifier()) || + templateHelper.isAbstract(attribute.getClassifier()) ) { // skip for this case (not a nm-multiplicity attribute) diff --git a/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaTemplateHelper.java b/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaTemplateHelper.java index cd70b7f..2bc5781 100644 --- a/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaTemplateHelper.java +++ b/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaTemplateHelper.java @@ -883,6 +883,17 @@ public class TopiaTemplateHelper { } /** + * Check if the given classifier is an abstract class + * + * @param classifier classifier to test + * @return {@code true} if the classifier is abstract, {@code false} otherwise + */ + public boolean isAbstract(ObjectModelClassifier classifier) { + ObjectModelClass aClass = model.getClass(classifier.getQualifiedName()); + return aClass.isAbstract(); + } + + /** * Obtain the value of the {@link TopiaTagValues#TAG_INHERITANCE_STRATEGY} tag value on the given classifier. * * @param classifier classifier to seek @@ -924,4 +935,5 @@ public class TopiaTemplateHelper { public static String getLegacyDaoName(ObjectModelClass input) { return input.getName() + "DAO"; } + } -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
participants (1)
-
nuiton.org scm