Ronald,

there's no need to define a mapping object, as your many-to-may relation will 
be handled automatically by Castor. And this should by definition include the 
handling of the keys in the mapping table. It looks like you have got the 
mapping slightly wrong, so can you please post the relevant mapping section, 
the DDL used to create the tables in question and some information about the 
classes engaging in such mapping ?

Werner

-----Urspr�ngliche Nachricht-----
Von: Ronald Rudy [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 02. Mai 2005 14:08
An: [email protected]
Betreff: [castor-dev] many-to-many mapping..


I have configured Castor to support a many-to-many relationship between two 
types of objects, but I'm getting an error.  This is because the mapping table 
itself (in Oracle) contains a primary key of its own, and this is not 
automatically assigned by Castor.  So when a new relationship is created, this 
primary key is null and the database throws an error.

I don't have control over the database schema - is there any way to configure 
Castor to recognize that the configured many-table has a primary key and the 
key can be created using the sequence key generator?  (the sequence key 
generator works fine for everything else)  Or am I going to be forced to create 
a "map" object that handles the relationship 'manually'?

-Ron

Reply via email to