File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Entity object not getting persisted: new object was found through a relationship that was not marked
 
Similar Threads
JPA strange error.
LazyInitializationException Help please
Outer join between 3 entities in HQL
Edit primary key, if it's a foreign key
javax.persistence.EntityNotFoundException: deleted entity passed to persist