This one time, at band camp, Aadithya Deshpande said:

AD>I have 2 tables, a primary and a dependent table
AD> 
AD><class name="Member" identity="id">
AD><field name="id" type="integer">
AD>    <sql name="id" type='integer"/>
AD></field>
AD><field name="preferences" type="Preferences" collection="Map">
AD>    <sql many-key="id">
AD></field>
AD></class>
AD> 
AD><class name="Preferences" identity="prefid">
AD><field name="prefid" type="integer">
AD>    <sql name="pref_id" type="integer"/>
AD></field>
AD><field name="id" type="Member">
AD>    <sql name="id">
AD></field>
AD><field name="key" type="string">
AD>    <sql name="key" type="varchar"/>
AD></field>
AD><field name="value" type="string">
AD>    <sql name="value" type="varchar"/>
AD></field>
AD></class>
AD> 
AD>I understand that in castor that the maps would be generated with a
AD>Member.put( Preference, Preference )
AD> 
AD>My question is, is there way to tell the converter that you want to treat
AD>the first preference as a string ( i.e. the Preference.key ) an the second
AD>can stay as is?
AD> 
AD>I thought about the possiblity of creating a specific map that would convert
AD>store the string key in the internal map by overridiing methods, (
AD>basically, the facade pattern ) but I figured I would throw it out to the
AD>experienced people and see how they would approach it.

Aadi,

Currently there is no way to do this in Castor. It cannot handle a
Collection of mixed types.

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

Reply via email to