-->
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.  [ 2 posts ] 
Author Message
 Post subject: Moved from 3.3.1.GA to 5.1.0.Final now EntityExistsException
PostPosted: Mon Dec 05, 2016 7:35 pm 
Regular
Regular

Joined: Wed Jan 21, 2009 8:41 pm
Posts: 54
So after moving from 3.3.1.GA to 5.1.0 I now have EntityExistExceptions

Is there any reason between these releases where I'd see this occuring?

FWIW the problem appears to be on the identifier associated with a child object getting associated with the persistence context when it's already been associated with the same identifier for another object.

Is GenerationType.SEQUENCE still based on HILO?

So is the GenerationType.SEQUENCE still a HILO based generator?

I show it to be this SequenceStyleGenerator and it doesn't look like it uses HiLo from a sequence with a non 1 cache size and a 1 increment by.


Top
 Profile  
 
 Post subject: Re: Moved from 3.3.1.GA to 5.1.0.Final now EntityExistsException
PostPosted: Tue Dec 06, 2016 12:55 am 
Regular
Regular

Joined: Wed Jan 21, 2009 8:41 pm
Posts: 54
Ok so my problem was due to the changes to the sequence generators so my earlier gut impression on HILO was in fact correct.

for now I've fixed it by adding the following to persistence.xml

<property name="hibernate.id.new_generator_mappings" value ="false"/>

This keeps using the older generators.

steffi2 wrote:
So after moving from 3.3.1.GA to 5.1.0 I now have EntityExistExceptions

Is there any reason between these releases where I'd see this occuring?

FWIW the problem appears to be on the identifier associated with a child object getting associated with the persistence context when it's already been associated with the same identifier for another object.

Is GenerationType.SEQUENCE still based on HILO?

So is the GenerationType.SEQUENCE still a HILO based generator?

I show it to be this SequenceStyleGenerator and it doesn't look like it uses HiLo from a sequence with a non 1 cache size and a 1 increment by.


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

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.