Skip to content

Support relationships between views #428

Description

@spassignat

Hello,
If we have a model like User -->* Role mapped on views RoleView, UserView, read operation works very well, but schemaTool (or auto-create) does not know how to deal with that situation.

I tested it on version 5.2 and the latest 6.0 available and didn't find in groups.io information. Please find the attached testcase.

Here is the Exception:
java.lang.ClassCastException: class org.datanucleus.store.rdbms.mapping.java.BigIntegerMapping cannot be cast to class org.datanucleus.store.rdbms.mapping.java.MultiMapping (org.datanucleus.store.rdbms.mapping.java.BigIntegerMapping and org.datanucleus.store.rdbms.mapping.java.MultiMapping are in unnamed module of loader 'app')
at org.datanucleus.store.rdbms.mapping.CorrespondentColumnsMapper.(CorrespondentColumnsMapper.java:254)
at org.datanucleus.store.rdbms.mapping.java.PersistableMapping.prepareColumnMapping(PersistableMapping.java:242)
at org.datanucleus.store.rdbms.mapping.java.PersistableMapping.initialize(PersistableMapping.java:130)
at org.datanucleus.store.rdbms.mapping.MappingManagerImpl.getMapping(MappingManagerImpl.java:663)
at org.datanucleus.store.rdbms.table.ClassView.initialize(ClassView.java:135)

The limitation seems to be the ClassView which consider a view does not have an id, which is not always the case. I think having id in view could help with caching, at least to have it optional
dn-view.zip
.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions