This one time, at band camp, Hudson Wong said:
HW >Is there anyone successfully mapping both the parent and child class to a
HW >single table? If so, how should be the mapping file?
HW >
I've not actually done this but I imagine that it would be fairly
easy. Just have each class map to different fields in the table.
This is completely contrived but I believe a mapping descriptor
might look like this:
<class name="Parent" identity="id">
<map-to table="person_info" />
<field name="id" type="big-decimal">
<sql name="parent_id" type="decimal" />
</field>
<field name="surName" type="string">
<sql name="sur_name" type="varchar2" />
</field>
<field name="givenName" type="string">
<sql name="given_name" type="varchar2" />
</field>
</class>
<class name="Child" identity="id">
<map-to table="person_info" />
<field name="id" type="big-decimal">
<sql name="child_id" type="decimal" />
</field>
<field name="address" type="string">
<sql name="address" type="varchar2" />
</field>
<field name="city" type="string">
<sql name="city" type="varchar2" />
</field>
</class>
Can anyone confirm or deny whether my example might work?
--
perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev