<hibernate-mapping default-cascade="none"> <class name="ch.thales.progres.db.IndsocImpl" table="INDSOC" dynamic-insert="false" dynamic-update="false">
<id name="id" type="long" unsaved-value="null"> <column name="ID" sql-type="NUMBER(19)"/> <generator class="native"> </generator> </id> ... ... <many-to-one name="dossoc" class="ch.thales.progres.db.DossocImpl" outer-join="auto" foreign-key="INDSOC_DSOCC" insert="false" update="false"> <column name="DSOC" not-null="false" sql-type="NUMBER(19)"/> </many-to-one> <many-to-one name="indivi" class="ch.thales.progres.db.IndiviImpl" outer-join="auto" foreign-key="INDSOC_INDIC" insert="false" update="false"> <column name="INDI" not-null="false" sql-type="NUMBER(19)"/> </many-to-one> <many-to-one name="personStatus" class="ch.thales.progres.db.NomencImpl" outer-join="auto" foreign-key="INDSOC_ID_TYPEQUALC" insert="false" update="false"> <column name="ID_TYPEQUAL" not-null="true" sql-type="NUMBER(19)"/> </many-to-one> </class> </hibernate-mapping> <hibernate-mapping default-cascade="none"> <class name="ch.thales.progres.db.IndiviImpl" table="INDIVI" dynamic-insert="false" dynamic-update="false"> <id name="id" type="long" unsaved-value="null"> <column name="ID" sql-type="NUMBER(19)"/> <generator class="native"> </generator> </id> ... ... <set name="indsocs" order-by="INDI" lazy="true" outer-join="auto" inverse="true"> <key foreign-key="INDSOC_INDIC"> <column name="INDI"/> </key> <one-to-many class="ch.thales.progres.db.IndsocImpl"/> </set> </class> </hibernate-mapping> I've created an association like that: <Indsoc> 0..* --- 0..1 <Indivi> _________________________________________________________ Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=1334#1334 Posting to http://forum.andromda.org/ is preferred over posting to the mailing list! ------------------------------------------------------- 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 _______________________________________________ Andromda-user mailing list Andromda-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/andromda-user