Hello Michael I don't know if it worked in 3.1 I would have to try it out. I am fairly new to Cayenne, not new to programming Java, nor working with databases, but new to Cayenne. I went through the mailing list and people were reporting that they work in production with the 4.1.M3 modeler, so I figured I would be ok. If I find some time this evening I will try to do the example in 3.1.
Best regards Simon On Die, 2016-03-29 at 08:12 -0400, Michael Gentry wrote: > Hi Simon, > > Is this something that worked correctly in 3.1 but not in 4.0M3? I'm > mainly asking to find out if a validation bug was introduced in > 4.0M3. > While we love people to try out our milestone releases, they are > still > under active development. 3.1 is the stable release. > > Thanks, > > mrg > > > On Sun, Mar 27, 2016 at 3:51 PM, Simon Farner <s.far...@bluewin.ch> > wrote: > > > > > Hello everybody > > > > I am trying to get the book/ebook/paper_book example to work with > > Cayenne Modler 4.0.M3, but it wont validate. This is the third time > > I > > try this and I really need to get this working now, I am not very > > keen > > on a road block meeting and switching to another ORM. > > > > I strugle with the relationships between superclass table and > > subclass > > table. I set up two relation ships in BOOK > > > > Name:"paperBook",Target:"PAPER_BOOK", To Dep PK:True, To > > Many:False > > Name:"eBook",Target:"E_BOOK", To Dep PK:True, To Many:False > > > > I then first create the ObjEntities for all three. Then I enter the > > type classifier field and set the inheritance. After wards I go to > > the > > two subclasses and map the two individual attributes they posses to > > the > > right subclass attribut. Then I save the project and the validation > > tells me that that all the ObjRelationships have uncompelte > > mappings. > > > > Example: "ObjRelationship book.eBook has incomplete DbRelationship > > mapping" > > > > I then go to Book ObjEntity and open both relationships to the > > subclass > > once, but I change nothing. Opon closing I am asked if I want to > > save > > my changes, because I some how have magically modified the path. I > > say > > yes. Then I validat again and all but two complaints are gone. > > Left > > over are: > > > > "ObjRelationship EBook.book has incomplete DbRelationship > > mapping" > > "ObjRelationship PaperBook.book has incomplete > > DbRelationship > > mapping" > > > > Those are the relation ships pointing back from the subclasses to > > the > > super clases. I can't fix them. When I open the edit dialog > > > > Can please someone help me to find out what I am doing wrong? I > > kind of > > feel stupid about asking here, because it is so trivial :/ But I > > really > > need this working. If someone wants to have a look at my cayenne > > project I put it on my drop box: https://www.dropbox.com/s/uw82cl1y > > xkl3 > > ohk/cayenne-project.xml?dl=0 > > > > Best regards and thanks to everybody for helping > > Simon > >