makeTransient() not working on Embedded class



I am using JDO and calling PMimpl.makeTransient(object) on an object which has a class of type @EmbeddedOnly in ObjectDB version 2.5.5.b05.

I get then the following error:

com.objectdb.o._JdoUserException: Type is not defined as an entity (@Entity is missing)
at com.objectdb.o.JDE.g(
at com.objectdb.o.ERR.f(
at com.objectdb.o.JDE.f(
at com.objectdb.o.OBC.onObjectDBError(
at com.objectdb.jdo.PMImpl.makeTransient(
at com.objectdb.jdo.PMImpl.makeTransient(


The error message is strange as it suggests using @Entity which is a JPA annotation while I am using JDO and PMImpl.

Should I not call the makeTransient() on an @EmbeddedOnly object at all ? Is it working only on @PersistenceCapable objects ?




You can invoke makeTransient only on instances of persistence capable classes (in JDO, or entity classes in JPA). Embedded objects are not managed by their own and cannot change state from managed to transient.

ObjectDB Support