Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-3814

[Validation] potential false positive with check explicit-logical-type-names

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Resolved
    • 2.1.0, 3.1.0
    • 2.2.0, 3.2.0
    • Core
    • None

    Description

      If by chance the logical type name equals the fully qualified class name, it might trigger
      validation error explicit-logical-type-names.

      java.lang.IllegalStateException: 
      [1] The object type nutridb.survey.Survey of sort ENTITY must be specified explicitly ('causeway.core.meta-model.validator.explicit-logical-type-names' config property). Defaulting the object type from the package/class/package name can lead to data migration issues for apps deployed to production (if the class is subsequently refactored). Use @Discriminator, @Named or @PersistenceCapable(schema=...) to specify explicitly.
      [2] The object type nutridb.survey.SurveyManager of sort VIEW_MODEL must be specified explicitly ('causeway.core.meta-model.validator.explicit-logical-type-names' config property). Defaulting the object type from the package/class/package name can lead to data migration issues for apps deployed to production (if the class is subsequently refactored). Use @Discriminator, @Named or @PersistenceCapable(schema=...) to specify explicitly.
      	at org.apache.causeway.commons.internal.exceptions._Exceptions.illegalState(_Exceptions.java:95) ~[classes/:?]
      	at org.apache.causeway.core.metamodel.specloader.SpecificationLoaderDefault.validateLater(SpecificationLoaderDefault.java:446) ~[causeway-core-metamodel-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
      	at org.apache.causeway.core.metamodel.specloader.specimpl.ObjectSpecificationAbstract.introspectUpTo(ObjectSpecificationAbstract.java:306) ~[causeway-core-metamodel-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
      	at org.apache.causeway.core.metamodel.specloader.specimpl.ObjectSpecificationAbstract.streamDeclaredAssociations(ObjectSpecificationAbstract.java:701) ~[causeway-core-metamodel-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
      	at org.apache.causeway.core.metamodel.specloader.specimpl.ObjectMemberContainer.streamAssociations(ObjectMemberContainer.java:152) ~[causeway-core-metamodel-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
      
      

      Attachments

        Activity

          People

            hobrom Andi Huber
            hobrom Andi Huber
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: