hi all,

I would like do a N:M mapping not for custom objects, but for
java.lang.Integer elements like:

[ this does not work for me, [ClassMolder.<init> NullPointerException ]
]

   <field name="myField"
           type="java.lang.Integer"
                 ^^^^^^^^^^^^^^^^^
           lazy="false"
           get-method="getMyField"
           set-method="setMyField"
           collection="collection">
      <sql name="my_field"
           many-key="id"
           many-table="objects_contains_fields" />
    </field>

class A {
  public Collection getMyField( ) {
     ...
  }
  public void setMyField( Collection value ) {
     ...
  }

}

// use case
A a = (A )db.load( A.class, 2 );
for ( Iterator it = a.getMyField( ).iterator( ); it.hasNext( ); )
{
   Integer el = (Integer ) it.next( );
}

but somehow I always get a NullPointer exception in ClassMolder.<init> @
358.

is this somehow possible?
or must all many-to-many relations be wrapped in a custom class, which
means, I would have to introduce a separate class and table.

thank you very much

-- Jakob Praher

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

Reply via email to