-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Cross references
PostPosted: Fri Nov 27, 2009 12:05 pm 
Newbie

Joined: Wed Feb 04, 2009 5:26 am
Posts: 5
Hi,

Here's the problem :
I have several objects (instances of A) that contain a map<String, B>.

Each map can contains the same B. I have also a main object (instance of C) that contains list of A.
so 'c' contains a list of a1 a2 a3, each a contains a map of (key string) and (value the same b1) :
c -- a1 -- <string,b1>
-- a2 -- <string,b1>
-- a3 -- <string,b1>

I cannot save this object, it leads me to :
ERROR 23505: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'SQL091127164652311' defined on 'A_TABLE_NAME.

It works perfectly if I use b1, b2, and b3 (3 different instances) instead of b1 three times.
Is someone can tell me what is the problem and how to correct it ?

thx, JL.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.