> In my prev message I didn't said that , I have defined the db using the > server , then I have generated the schema using the jdbc ant task and > the classes using the om ant task. > I don't want to define myself the shema file because I'm more famliar > with SQL and then I don't want to make Torque create or modify my DDL.
The schema generated via the ant task can only serve as a starting point, because Torque uses only the information the jdbc driver provides. This means e.g. it does not automatically detect the method the id is generated, or it can mess up the default values. So you need to fine-tune the schema generated by the jdbc task. In your case, set the attribute defaultIdMethod to "native" on the database element (this will give you id generation by sequences in postgresql), and remove the attributes named "default" on the column elements. However, I do not know out of the box how to influence the sequence names which are expected by torque, it would be easiest if the sequences would have the default name (for these check the ddl generated by torque) I am surprised that the jdbc task recognizes foreign keys ? Or did you add the foreign-key elements yourself ? Thomas