Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Eclipselink-7197 Null primary key

I think the find() does a flush internally. This is unexpected and the
entities may be in an inconsistent state. Here may be one of the entity has
0 or null set to the PK. Best way to solve this to "end the transaction" at
the end of persist (which will cause flush) and then do the find(). If this
cannot be done, set the flush mode to COMMIT instead of AUTO and try.


Andreas K├Ânig-2 wrote:
> 
> Hey everybody!
> 
> I'm quite new to Eclipselink and I have a serious problem here, that I'm 
> trying to understand/solve for over a week now:
> 
> We have a web application using spring.
> 
> I create a new object and save it via jpaTemplate.persist();
> Later I try to load it via jpaTemplate.find().
> That results in an Eclipselink-7197-error:
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Eclipselink-7197-Null-primary-key-tp20738456p28657658.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top