Can I ask for a bit of a sanity check here, please?
I have hibernate mappings built manually and functioning as follows: For class LandUnit ... <composite-id name="compId"> <key-property name="loteId"> <column name="LOTE_ID"/> </key-property> <key-property name="predioId"> <column name="PREDIO_ID"/> </key-property> </composite-id> <set name="owners" table="cpe_propie_pred" order-by="titular_id" outer-join="auto" lazy="true" inverse="false"> <key foreign-key="predio_id"> <column name="LOTE_ID"/> <column name="predio_id"/> </key> <many-to-many class="mpm.persons.persistence_layer.Person" column="titular_id" foreign-key="titular_id"/> </set> ... and for class Person .... <id column="TITULAR_ID" name="titularId" type="java.lang.Long"> <generator class="org.hibernate.id.TableHiLoGenerator"> <param name="table">idgen</param> <param name="column">NEXT</param> </generator> </id> <set name="properties" table="CPE_PROPIE_PRED" inverse="false"> <key column="TITULAR_ID" /> <many-to-many class="mpm.landregistry.persistence_layer.Predio" unique="true"> <column name="LOTE_ID"/> <column name="PREDIO_ID"/> </many-to-many> </set> I can generate all of this from my diagram and, (as long as I edit the composite-id into the mapping), it works just as well as the manual original. Is there a way to generate the composite key? If I generate it, how can I get the many-to-many to refer to it correctly? Changing to a different type of primary key structure is not feasable. Thanks! -- Regards, Hasan _________________________________________________________ Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=2193#2193 Posting to http://forum.andromda.org/ is preferred over posting to the mailing list! ------------------------------------------------------- This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar _______________________________________________ Andromda-user mailing list Andromda-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/andromda-user