Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Resolved
-
2.0.0-M7
Description
DB: mysql 8
Tested project: Demo App SimpleApp 2.0.0.M7
When this is used:
GenerationType.SEQUENCE
Error:
Caused by: java.lang.IllegalArgumentException: The persistence layer does not recognize given object of type domainapp.modules.simple.dom.so.SimpleObject, meaning the object has no identifier that associates it with the persistence layer. (most likely, because the object is detached, eg. was not persisted after being new-ed up)
at org.apache.isis.commons.internal.exceptions._Exceptions.illegalArgument(_Exceptions.java:79) ~[isis-commons-2.0.0-M7.jar:2.0.0-M7]
at org.apache.isis.persistence.jpa.integration.entity.JpaEntityFacetFactory$JpaEntityFacet.identifierFor(JpaEntityFacetFactory.java:135) ~[isis-persistence-jpa-integration-2.0.0-M7.jar:2.0.0-M7]
at org.apache.isis.core.metamodel.objectmanager.ObjectManager.autoBookmarked(ObjectManager.java:207) ~[isis-core-metamodel-2.0.0-M7.jar:2.0.0-M7]
at org.apache.isis.core.metamodel.objectmanager.ObjectManager.adapt(ObjectManager.java:158) ~[isis-core-metamodel-2.0.0-M7.jar:2.0.0-M7]
at org.apache.isis.core.metamodel.objectmanager.ObjectManager.adapt(ObjectManager.java:130) ~[isis-core-metamodel-2.0.0-M7.jar:2.0.0-M7]
at org.apache.isis.persistence.jpa.applib.integration.IsisEntityListener.onPrePersist(IsisEntityListener.java:73) ~[isis-persistence-jpa-applib-2.0.0-M7.jar:2.0.0-M7]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.invokeMethod(PrivilegedAccessHelper.java:530) ~[org.eclipse.persistence.core-2.7.10.jar:?]
at org.eclipse.persistence.internal.jpa.metadata.listeners.EntityListener.invokeMethod(EntityListener.java:322) ~[org.eclipse.persistence.jpa-2.7.10.jar:?]
at org.eclipse.persistence.internal.jpa.metadata.listeners.EntityListener.invokeMethod(EntityListener.java:346) ~[org.eclipse.persistence.jpa-2.7.10.jar:?]
at org.eclipse.persistence.internal.jpa.metadata.listeners.EntityListener.prePersist(EntityListener.java:453) ~[org.eclipse.persistence.jpa-2.7.10.jar:?]
at org.eclipse.persistence.descriptors.DescriptorEventManager.notifyListener(DescriptorEventManager.java:746) ~[org.eclipse.persistence.core-2.7.10.jar:?]
at org.eclipse.persistence.descriptors.DescriptorEventManager.notifyEJB30Listeners(DescriptorEventManager.java:672) ~[org.eclipse.persistence.core-2.7.10.jar:?]
at org.eclipse.persistence.descriptors.DescriptorEventManager.executeEvent(DescriptorEventManager.java:233) ~[org.eclipse.persistence.core-2.7.10.jar:?]
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectClone(UnitOfWorkImpl.java:4468) ~[org.eclipse.persistence.core-2.7.10.jar:?]
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNotRegisteredNewObjectForPersist(UnitOfWorkImpl.java:4445) ~[org.eclipse.persistence.core-2.7.10.jar:?]
at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.registerNotRegisteredNewObjectForPersist(RepeatableWriteUnitOfWork.java:523) ~[org.eclipse.persistence.core-2.7.10.jar:?]
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:4387) ~[org.eclipse.persistence.core-2.7.10.jar:?]
Basically the entity does not get a auto-generated primary key. This worked before in 2.0.0.M6
Thanks!