wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes Entity object not getting persisted: new object was found through a relationship that was not marked Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Entity object not getting persisted: new object was found through a relationship that was not marked" Watch "Entity object not getting persisted: new object was found through a relationship that was not marked" New topic
Author

Entity object not getting persisted: new object was found through a relationship that was not marked

Kshitiz Agarwal
Ranch Hand

Joined: Dec 15, 2011
Posts: 36
Hi,

I am trying to persist the following entity:



But the error comes out:

During synchronization a new object was found through a relationship that was not marked cascade PERSIST: entity.PostEntity@16afec.
but when I try to persist PostEntity, it is persisted. No such exception is thrown:



Why it is happening? UserEntity is:



I am using EclipseLink
 
jQuery in Action, 2nd edition
 
subject: Entity object not getting persisted: new object was found through a relationship that was not marked
 
Similar Threads
Outer join between 3 entities in HQL
javax.persistence.EntityNotFoundException: deleted entity passed to persist
LazyInitializationException Help please
JPA strange error.
Edit primary key, if it's a foreign key