Hello, I'm looking for any clues to help troubleshoot the following error:
Encountered unmanaged object in persistent field > "blah.model.MyEntity.myPropA" during flush. However, this field does not > allow cascade persist. Set the cascade attribute for this field to > CascadeType.PERSIST or CascadeType.ALL (JPA annotations) or "persist" or > "all" (JPA orm.xml), or enable cascade-persist globally, or manually persist > the related field value prior to flushing. You cannot flush unmanaged objects > or graphs that have persistent associations to unmanaged objects. It is happening very occasionally on a production system (Tomcat). I can't reproduce it. Here it is "myPropA" but it happened on "myPropB" as well. In both cases the objects of A and B were in the database already and not modified as part of the transaction. Anyone have any idea what could cause the properties to become "unmanaged"? I have to assume they were managed at some point since they were retrieved from the database via an entity manager (and the system is working largely as expected). I could set the cascade to PERSIST, but I don't need it and I don't know what it will do - maybe it will try to reinsert a copy of the object already in the database. Thanks. OpenJPA 1.2.1 -- Daryl Stultz _____________________________________ 6 Degrees Software and Consulting, Inc. http://www.6degrees.com mailto:da...@6degrees.com