<table name="personCommittee">
<column
   name="IdComite"
   required="true"
   primaryKey="true"
   type="INTEGER"/>
<column
   name="IdPerson"
   required="true"
   primaryKey="true"
   type="INTEGER"/>
</table>

In that mapping above, I can make it work, but only for retrieving
objects.
It works perfectly hidrating the objects, no problem at all.

But I can not create a new object, by the time of .save() method, It
raises an
exception of "Criteria has nothing to insert", it's something saying that
the
criteria was empty, and so on nothing is inserted/saved into database.

There is nothing wrong with your mapping, except that you should use idMethod="none" for tables where you do not want or torque does not support auto-generated primary keys (as in your mapping; auto-generation of primary keys would not make sense). This is what you do with auto-increment=none, but settinbg the defaultIdMethod is preferred (because more db-independent).


Does torque really don't suport multiple-primary keys or there's some hidden
way for getting them work?


I have mappings like yours working for me so composite primary keys are definitely supported by torque. To work out why you run into problems, I'd need some more information:

- what database are you using ?
- Could you provide a simple code sample where you try to save a PersonCommittee object ?

   Thomas


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

Reply via email to