You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "Hao S (Jira)" <ji...@apache.org> on 2022/03/25 22:39:00 UTC

[jira] [Created] (ISIS-2984) @GeneratedValue(strategy = GenerationType.SEQUENCE) no longer works after migrating to 2.0.0.M7

Hao S created ISIS-2984:
---------------------------

             Summary: @GeneratedValue(strategy = GenerationType.SEQUENCE) no longer works after migrating to 2.0.0.M7
                 Key: ISIS-2984
                 URL: https://issues.apache.org/jira/browse/ISIS-2984
             Project: Isis
          Issue Type: Bug
          Components: Isis Persistence JPA
    Affects Versions: 2.0.0-M7
            Reporter: Hao S


DB: mysql 8

When this is used:
{code:java}
GenerationType.SEQUENCE{code}
Error:
{code:java}
Caused by: java.lang.IllegalArgumentException: The persistence layer does not recognize given object of type xxx, 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] {code}
Basically the entity does not get a auto-generated primary key. This worked before in 2.0.0.M6

Thanks!



--
This message was sent by Atlassian Jira
(v8.20.1#820001)