datanucleus-rdbms
datanucleus-rdbms copied to clipboard
Support relationships between views
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.
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 .
An RDBMS "VIEW" doesn't have a primary key in most treatments of VIEW.