cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: Trouble with modeling vertical inheritance
Date Tue, 29 Mar 2016 17:32:15 GMT

> On Mar 28, 2016, at 10:22 PM, Simon Farner <> wrote:
>> Ok, that's cayenne.xml. Do you also have a *.map.xml? That's the main
>> ORM file.
> Offcourse I can provide you with this file. I should now be able to get
> it from
> Now I also sorted out the reply address. You shouldn't have this pop up
> in moderation now. And thank you for your patience again. You must all
> think I am the biggest dork ever. Hard to believe that I work with
> computers for a living :P

What confused the Modeler is 2 ObjRelationships from subclasses back to superclass. They are
not needed, and once you delete them, the model validates (see the diff below - I removed
a total of 4 Obj* relationships between base class and subclasses). 

"Sync ObjEntity with DbEntity" button in the Modeler insists on adding these relationships
back (which is a bug and we need to address it). So make sure you delete those, if they are
ever created during sync.


--- a/
+++ b/
@@ -90,10 +90,6 @@
        <db-relationship name="book" source="PAPER_BOOK" target="BOOK" toMany="false">
                <db-attribute-pair source="ID" target="ID"/>
-       <obj-relationship name="eBook" source="Book" target="EBook" deleteRule="Nullify"
-       <obj-relationship name="paperBook" source="Book" target="Book" deleteRule="Nullify"
-       <obj-relationship name="book" source="EBook" target="Book" deleteRule="Nullify"
        <obj-relationship name="artist" source="Painting" target="Artist" deleteRule="Nullify"
        <obj-relationship name="gallery" source="Painting" target="Gallery" deleteRule="Nullify"
-       <obj-relationship name="book" source="PaperBook" target="Book" deleteRule="Nullify"

View raw message