[ http://galaxy.andromda.org:8080/jira/browse/SPRING-45?page=comments#action_11207 ] Paul Pavlidis commented on SPRING-45: -------------------------------------
I believe this is essentially a duplicate of spring-32 > applicationContext does not contain all the hbm.xml entries under mapping > resources in sessionFactory bean > ---------------------------------------------------------------------------------------------------------- > > Key: SPRING-45 > URL: http://galaxy.andromda.org:8080/jira/browse/SPRING-45 > Project: Spring Cartridge > Type: Bug > Versions: 3.0RC1 > Reporter: Kiran Keshav > Assignee: Chad Brandon > Attachments: applicationContext.xml.vsl_patch.txt > > Sometimes "concrete" gets translated into "interface", behind the scenes. > Just the word, not the strategy. > ----------------------- (verbatim) > /** > * Return true if this Entity is a root in terms of Hibernate, eq has a > * hbm.xml file. interface - false > * > * @return true if this Entity is a root > * @see > org.andromda.cartridges.hibernate.metafacades.HibernateEntity#isRootInherita > n > ceEntity() > */ > protected boolean handleIsRootInheritanceEntity() > { > boolean result = false; > GeneralizableElementFacade superElement = this.getGeneralization(); > if (superElement == null) > { > String inheritance = this.getInheritance(this); > // We are a root if we are the base class and not interface > // inheritance > result = (inheritance == null) > || !inheritance.equals(INHERITANCE_STRATEGY_INTERFACE); > } > else > { > // We are a subclass > GeneralizableElementFacade root = getRootInheritanceEntity(); > String inheritance = getInheritance(root); > // Are we the subclass element > result = root.getFullyQualifiedName().equals( > getFullyQualifiedName()); > if (!result && inheritance != null > && inheritance.equals(INHERITANCE_STRATEGY_SUBCLASS)) > { > // If not check if we are a subclass > result = superElement.getFullyQualifiedName().equals( > root.getFullyQualifiedName()); > } > } > return result; > } > ----- > problems: > Should check for INHERITANCE_STRATEGY_CONCRETE for the superElement. > ----- > Patch to fix the applicationContext bug: > #foreach($entity in $entities) > #set($generalization = $entity.generalization) #set($genstrat = > $generalization.hibernateInheritanceStrategy) > #if ( $entity.isRootInheritanceEntity() && > $entity.hibernateInheritanceStrategy != "concrete" && > $entity.hibernateInheritanceStrategy != "interface" && $genstrat != > "subclass" && $genstrat != "class") > <value>${entity.packagePath}/${entity.entityName}.hbm.xml</value> > #end > #end -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://galaxy.andromda.org:8080/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Andromda-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/andromda-devel
