On 12/22/2011 2:18 PM, Markus Ewald wrote:
And here are my mappings:

Looks like Thunderbird messed up the indentation.

Forgive me for mailbombing the list, here's the same again via an attached text file ;-)

-Markus-

--
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.

        <class name="TreatmentSchema" table="Treatments" 
discriminator-value="0">
                <id name="Id" />
                <discriminator formula="(case when SchemaId is null then 0 else 
1 end)" />
                <!-- Lots of other properties -->
        </class>

        <subclass name="TreatmentPlan" extends="TreatmentSchema" 
discriminator-value="1">
                <many-to-one name="Diagnosis" column="DiagnosisId" />
                <property name="SchemaId" not-null="true" />
                <!-- Lots of other properties -->
        </subclass>

        <class name="Diagnosis" table="Diagnoses">
                <id name="Id" />
                <!-- Lots of other properties -->
                <set name="Clients" table="ClientDiagnoses" access="noop">
                        <key column="DiagnosisId" />
                        <many-to-many class="Client" column="ClientId" />
                </set>
        </class>

        <class name="Client" table="Clients">
                <id name="Id" />
                <!-- Lots of other properties -->
                <set name="Diagnoses" table="ClientDiagnoses" access="noop">
                        <key column="ClientId" />
                        <many-to-many class="Diagnosis" column="DiagnosisId" />
                </set>
        </class>

Reply via email to