On Jun 16, 2005, at 8:31 PM, Emmanuel Bernard wrote:
This complexify the annotations (user experience, not the binding code), so I'm wondering whether I should allow this kind of structure or not.
Also check: http://opensource.atlassian.com/projects/hibernate/browse/ HHH-539
Yep, used it recently for a customer who had a composite primary key with some fields also part of a composite foreign key (would need duplicate column mapping):
<set name="feeAssociations" lazy="true" cascade="none" table="RP_FEE"> <key> <column name="RP_ID" /> <column name="PROP_ID" /> </key> <composite-element class="FeeAssociation"> <many-to-one name="feeElement" class="com.test.FeeElement"> <column name="FEE_ID"/> <formula>PROD_ID</formula> </many-to-one> <property name="feeInclusiveSetting" column="FEE_INCL_CD" /> </composite-element> </set> It's used as a literal join condition. ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel