cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dzmitry Kazimirchyk (Closed) (JIRA)" <>
Subject [jira] [Closed] (CAY-1477) Modeler: Better validation for erroneous horizontal inheritance mapping
Date Tue, 11 Oct 2011 12:29:11 GMT


Dzmitry Kazimirchyk closed CAY-1477.

       Resolution: Fixed
    Fix Version/s: 3.1M4
> Modeler: Better validation for erroneous horizontal inheritance mapping
> -----------------------------------------------------------------------
>                 Key: CAY-1477
>                 URL:
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Modeler
>    Affects Versions: 3.0
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>             Fix For: 3.1M4
> see for details. 
> If a user erroneously maps subclass to the same table as superclass (instead of leaving
it blank), Cayenne generates incorrect queries in runtime. Also the Modeler seems to go nuts.
Flattened attributes mapping stops working for instance. I was getting exceptions like:
> Caused by: java.lang.NullPointerException
> 	at org.apache.cayenne.modeler.dialog.objentity.ObjAttributeInfoDialog.isChange(
> 	at org.apache.cayenne.modeler.dialog.objentity.ObjAttributeInfoDialog.setPath(
> 	at org.apache.cayenne.modeler.dialog.objentity.ObjAttributeInfoDialog.saveMapping(
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> So since specifying a table different than superclass would constitute unsupported horizontal
inheritance, it probably shouldn't be allowed (we should disable the conbobox if superclass
is selected). For sanity sake (and to cleanly "upgrade" the existing bad mappings) we should
probably check subclass DbEntity value on save and quitely remove it if it is same as superclass,
and give a validation error if it is not.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message