[Problem] with bidirectional 1-N relationship

2 posts / 0 new
Last post
Marc
Offline
Joined: 07/08/2009
[Problem] with bidirectional 1-N relationship

Hi,

 

I encounter a problem with a bidirectional 1-N  link from Company to Departments.

 

When I add a Company, I then save, and then I add a new Department for that Company and save again, all works well.

 

But when I enter a new Company, and immediately add a new Department and try to save both at once, I get the following error:

 

The current operations cannot proceed. Data constraints are not satisfied (unicity, references).”

 

I think this might be related to issue http://www.jspresso.org/forum/notice-35-snapshot-and-358.

 

I get this error even if I build with 3.5.9 and I understood the xml-model with reverse-entities can stay as before? I add my model here.

 

Any idea?

 

Thanks,

Marc

AttachmentSize
model.xml7.81 KB
vvandens
Offline
Joined: 05/29/2008
[Problem] with bidirectional 1-N relationship

Hi Marc,

I couldn't reproduce it on 3.5.9 neither on 3.5-SNAPSHOT. The change you quote is only related to symetric (i.e 1-1 and N-N, but not 1-N) bidi relationships.

HRSample has the same sort of model and creating a Company and a Department in the same save transaction works fine.

 

Best,

Vincent