Two issues with your mapping file:

1) You have laze="false", it should be lazy="false", or don't include it
   since that is the default setting.

2) you list the sql many-key in collections.  Try this:
    <!-- Order has reference to OrderLine
         many OrderLines per Order  -->
    <field name="orderLines" type="com.OrderLine" required="true"
           lazy="false" collection="vector"/>

instead.  Does it work?

<mapping>
  <!--  Mapping for Order  -->
  <class name="com.MyOrder"
         identity="id">
    <description>Order definition</description>
    <map-to table="orders_s"/>
    <field name="id" type="integer">
      <sql name="id" type="integer" />
    </field>

    <field name="name" type="string">
      <sql name="name" type="char" />
    </field>

    <!-- Order has reference to OrderLine
         many OrderLines per Order  -->
    <field name="orderLines" type="com.OrderLine" required="true"
           laze="false" collection="vector">
      <sql many-key="order_id"/>
    </field>
  </class>

  <!--  Mapping for OrderLine  -->
  <class name="com.OrderLine" identity="id" depends="com.MyOrder"
                key-generator="MAX">
    <description>An order orderLine, any number of orderLines can belong
to
                 the same order</description>
    <map-to table="orderline_s" />
    <field name="id" type="integer">
      <sql name="id" type="integer"/>
    </field>
  
    <field name="myOrder" type="com.MyOrder">
      <sql name="order_id"/>
    </field>
  </class>

</mapping>



=====
Virtually,   Ned Wolpert <[EMAIL PROTECTED]>

"Who watches the watchmen?"  -Juvenal, 120 AD (4e75)

__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to