Use Complex class. Complex identity = new Complex(firstName, lastName); Object o = db.load(com.xyz.MyObject.class, identity);
-----Original Message----- From: Fabien Baligand [mailto:[EMAIL PROTECTED]] Sent: Monday, January 21, 2002 7:33 PM To: [EMAIL PROTECTED] Subject: [castor-dev] How can I load an object which have a multiple columns primary key ? If I have the following mapping : <mapping> <class name="com.xyz.MyObject" identity="firstName lastName"> <field name="firstName" type="string"> <sql name="fname"/> </field> <field name="lastName" type="string"> <sql name="lname"/> </field> <field ... /> ... </class> </mapping> what is the java code to load such an object ? I want to say a java code like this : Database db; ... com.xyz.MyObject myObject = db.load (com.xyz.MyObject.class, specialObjectContainingThe2Keys); ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
