[ http://jira.andromda.org/browse/HIB-173?page=comments#action_13760 ] 

Govind Krishna Mekala commented on HIB-173:
-------------------------------------------

Looks like this portion of the code is changed in 3.2. I had a model as 
following
abc(0..*)<>------abcd(0..*)(ordered) 

In 3.2 RC1 the generated hbm used to be like this
 <list name="abcd" table="abc2abcd"  lazy="true" fetch="select" inverse="false">
and
<set name="abc" table="abc2abcd" order-by="abc_FK" lazy="true" fetch="select" 
inverse="true">

In 3.2 the generated hbm is just opposite
<list name="abcd" table="abc2abcd"  lazy="true" fetch="select" inverse="true">
and
<set name="abc" table="abc2abcd" order-by="abc_FK" lazy="true" fetch="select" 
inverse="false">

I downloaded the source and compared HibernateAssociationEndLogicImpl.java in 
both 3.2RC1 and 3.2.
The aggregation condition is missing. Not sure if that is causing the behavior 
to reverse.
Is there anyway I could dictate where the inverse should be in model inspite of 
relying on these logic blocks.




> many2many inverse
> -----------------
>
>          Key: HIB-173
>          URL: http://jira.andromda.org/browse/HIB-173
>      Project: Hibernate Cartridge
>         Type: Improvement

>     Versions: 3.1
>     Reporter: Darius Schier
>     Assignee: Carlos Cuenca
>      Fix For: 3.2-RC1

>
> Hi there,
> until now many2many associations added the inverse flag at that side which's 
> side was lexically longer. By a minor change within hibernate's association 
> end locig implementation, the behaviour could be more deterministic:
>     protected boolean handleIsHibernateInverse()
>     {
>         // inverse can only be true if the relation is bidirectional
>         boolean inverse = this.isNavigable() && 
> this.getOtherEnd().isNavigable();
>         if (inverse)
>         {
>             inverse = this.isMany2One();
>             if (this.isMany2Many() && !inverse)
>             {
>                inverse = isAggregation() || isComposition();
>             }
>         }
>         return inverse;
>     }
> Setting the values at the "diamond's" side should be enough (which could be a 
> matter of discussion of course).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.andromda.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

Reply via email to