Andi Huber created CAUSEWAY-3814:
------------------------------------

             Summary: [Validation] potential false positive with check 
explicit-logical-type-names
                 Key: CAUSEWAY-3814
                 URL: https://issues.apache.org/jira/browse/CAUSEWAY-3814
             Project: Causeway
          Issue Type: Bug
          Components: Core
    Affects Versions: 3.1.0, 2.1.0
            Reporter: Andi Huber
            Assignee: Andi Huber
             Fix For: 2.2.0, 3.2.0


If by chance the logical type name equals the fully qualified class name, it 
might trigger
validation error explicit-logical-type-names.
{noformat}
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]

{noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to