[
http://team.andromda.org:8080/jira/browse/HIB-3?page=comments#action_10621 ]
Martin Vlcek commented on HIB-3:
--------------------------------
I also had the issue with a one-to-one relationship generating 2 foreign keys
(actually it was a [0..1]-to-one relationship). Probably because of this the
'managesRelationalLink' property was on the correct side for me.
Thus I just corrected the HibernateEntity.vsl in the 'relation' area as follows:
#if ($associationEnd.one2One || $associationEnd.many2One)
## (MVL) added this case:
#if ($associationEnd.one2One && !$associationEnd.managesRelationalLink)
* @hibernate.one-to-one
* class="$targetTypeName"
* property-ref="$associationEnd.name"
#else
* @hibernate.many-to-one
* column="$target.columnName"
* class="$targetTypeName"
#if (!$associationEnd.managesRelationalLink)
* inverse="true"
#end
#end
...
However, xdoclet-1.2 wouldn't use the property-ref attribute, but after
upgrading to xdoclet-1.2.2 everything worked fine.
> One to one association generates redundant association
> ------------------------------------------------------
>
> Key: HIB-3
> URL: http://team.andromda.org:8080/jira/browse/HIB-3
> Project: Hibernate Cartridge
> Type: Improvement
> Reporter: Walter Itamar MourÃo
> Assignee: Matthias Bohlen
> Fix For: 3.0M3
> Attachments: TestedWithThisModel.jpg, beans.zip, hibtestModel.xml.zip
>
>
> Nowadays andromda generates id reference in both sides of one to one
> associations, at database level. Maybe it should use the association
> navegability to decide where to put the id reference.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://team.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
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Andromda-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-devel