I had the similar problem, but fortunately I had the control over database 
schema, so had the possibility to change the many table.
Unfortunately, I coludn't find the solution for this situtation other then 
throwing out the key field from this table. 
I think Castor asssumes that the primary key of the many table is composed out 
of the primary keys of tables involved in the many-to-many relation.

Regards,
Emir



----- Original Message -----
From: Ronald Rudy <[EMAIL PROTECTED]>
Date: Monday, May 2, 2005 2:07 pm
Subject: [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 
> mappingtable 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 
> primarykey 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