Hmm...
Here is my mapping and SQL (NH2.1.0)

<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
        assembly="NHTest" namespace="NHTest" auto-import="true">

        <class name="Parent" table="parent">
                <id name="Id" column="p_id">
                        <generator class="native" />
                </id>

                <property name="FieldA" column="p_field_a" />
                <one-to-one name="Child" class="Child" cascade="save-update"
constrained="true"/>
        </class>

        <class name="Child" table="child" lazy="true">
                <id name="Id" column="c_id">
                        <generator class="foreign">
                                <param name="property">Parent</param>
                        </generator>
                </id>

                <property name="FieldA" column="c_field_a" />
                <one-to-one name="Parent" class="Parent" constrained="true" />
        </class>
</hibernate-mapping>

NHibernate:
    /* load NHTest.Parent */ SELECT
        parent0_.p_id as p1_0_0_,
        parent0_.p_field_a as p2_0_0_
    FROM
        parent parent0_
    WHERE
        parent0_.p_...@p0;
    @p0 = 1
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to