You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by p b <ba...@hotmail.com> on 2005/01/24 18:51:13 UTC

Non-Decomposed m:n Mappings

Hello,
we are migrating from OJB 1.0 to 1.0.1
I have a Non-Decomposed m:n Mappings working perfectly under 1.0, after the 
migration to 1.0.1 (added the 
collection-class="org.apache.ojb.broker.util.collections.ManageableVector" 
in table descriptors)  I have a
org.apache.ojb.broker.KeyConstraintViolatedException: SQL failure while 
insert object data for class it.gesi.userprofiling.Profile, PK of the given 
object is [ id=39426443], object was Profile

The test is stupid enough:
...
{
		StoreUseCase useCase1 = new StoreUseCase();
		useCase1.setProfile(profile);
		useCase1.apply();


		StoreUseCase useCase2 = new StoreUseCase();
		useCase2.setProfile(profile);
		useCase2.apply();
}

Anyone have seen this before

Thanks



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Non-Decomposed m:n Mappings

Posted by Armin Waibel <ar...@apache.org>.
Hi,

only problems I know is when using ODMG-api with non-dec.-m:n (see 
release-notes). Could you post the metadata declaration of the m:n 
relation and the (pseudo) code of StoreUseCase.

regards,
Armin

p b wrote:
> Hello,
> we are migrating from OJB 1.0 to 1.0.1
> I have a Non-Decomposed m:n Mappings working perfectly under 1.0, after 
> the migration to 1.0.1 (added the 
> collection-class="org.apache.ojb.broker.util.collections.ManageableVector" 
> in table descriptors)  I have a
> org.apache.ojb.broker.KeyConstraintViolatedException: SQL failure while 
> insert object data for class it.gesi.userprofiling.Profile, PK of the 
> given object is [ id=39426443], object was Profile
> 
> The test is stupid enough:
> ...
> {
>         StoreUseCase useCase1 = new StoreUseCase();
>         useCase1.setProfile(profile);
>         useCase1.apply();
> 
> 
>         StoreUseCase useCase2 = new StoreUseCase();
>         useCase2.setProfile(profile);
>         useCase2.apply();
> }
> 
> Anyone have seen this before
> 
> Thanks
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org