does anyone have a simple example using ODMG and 1:n mappings

I can get a cascading inserts and Delets to work.

I can not get any updates into the Many portion (FlexFieldList) of the my
mapping.

if someone could give me a few lines of code to properly update the 2
tables.

I'm not sure if I have to select the row first, ect.

Any help would be great.

Here is the Mapping

<class-descriptor
    class="com.redpillconsulting.eca.businessobjects.FlexField"
    table="FLEX_FIELD_T" isolation-level="read-uncommitted">
    <field-descriptor
        column="FLEX_FIELD_NAME"
        id="1"
        jdbc-type="CHAR"
        name="flexFieldName"
        primarykey="true"/>
    <field-descriptor
        column="FLEX_FIELD_LABEL"
        id="2"
        jdbc-type="VARCHAR"
        name="flexFieldLabel"
        nullable="false"/>
    <field-descriptor
        column="FLEX_FIELD_REQUIRED"
        id="3"
        jdbc-type="INTEGER"

conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFieldCo
nversion"
        name="flexFieldRequired"
        nullable="false"/>
    <field-descriptor
        column="FLEX_FIELD_ENABLED"
        id="4"
        jdbc-type="INTEGER"

conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFieldCo
nversion"
        name="flexFieldEnabled"
        nullable="false"/>
    <field-descriptor
        column="FLEX_FIELD_TYPE"
        id="5"
        jdbc-type="CHAR"
        name="flexFieldType"
        nullable="false"/>
    <field-descriptor
        column="FLEX_FIELD_CATEGORY"
        id="6"
        jdbc-type="CHAR"
        name="flexFieldCategory"
        nullable="false"/>
    <collection-descriptor
         name="flexFieldList"

element-class-ref="com.redpillconsulting.eca.businessobjects.FlexFieldList">
         <inverse-foreignkey field-id-ref="2"/>
      </collection-descriptor>
</class-descriptor>
<class-descriptor
    class="com.redpillconsulting.eca.businessobjects.FlexFieldList"
    table="FLEX_FIELD_LISTS_T"
    isolation-level="serializable">
    <field-descriptor
        column="ID"
        id="1"
        jdbc-type="INTEGER"
        name="oid"
        primarykey="true"
        autoincrement="true"/>
    <field-descriptor
        column="FLEX_FIELD_NAME"
        id="2"
        jdbc-type="VARCHAR"
        name="flexFieldName"
        nullable="false"/>
    <field-descriptor
        column="LIST_VALUE"
        id="3"
        jdbc-type="VARCHAR"
        name="flexFieldListValue"
        nullable="false"/>
    <reference-descriptor
         name="flexField"
         class-ref="com.redpillconsulting.eca.businessobjects.FlexField">
         <foreignkey field-id-ref="2"/>
      </reference-descriptor>
</class-descriptor>




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to