Open
Description
Sergey Matyukevich created an issue — 24th April 2012, 6:01:31:
I have a simple mapping declaration:
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="NHibernate.Test" namespace=" NHibernate.Test.CustomTest"> <class name="Child" table="CHILDREN"> <id name="Id" column="ID"> <generator class="increment" /> </id> <joined-subclass name="Parent" table="PARENTS"> <key column="ID"/> <one-to-one name="Info" constrained="true" cascade="all"/> </joined-subclass> </class> <class name="Info" table="INFO"> <id name="Id" column="ID"> <generator class="foreign"> <param name="property">Parent</param> </generator> </id> <one-to-one name="Parent" /> </class> </hibernate-mapping>It seems that everything works correct for such kind of mapping and insertions are made in the right order, but when I user schema generation tool, it generates table PARENTS with only one foreign key from PARENTS.ID to CHILDREN.ID. I also expect foreign key from PARENTS.ID to INFO.ID to be generated (as part of one-to-one declaration)