You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Simon Farner <s....@bluewin.ch> on 2016/03/27 21:51:10 UTC

Modeling vertical inheritance

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/uw82cl1yxkl3
ohk/cayenne-project.xml?dl=0

Best regards and thanks to everybody for helping
Simon

Re: Modeling vertical inheritance

Posted by Andrus Adamchik <an...@objectstyle.org>.
FWIW, this message also came through moderation. (Probably because of the the different From: address compared to your original subscription).

A.


> On Mar 28, 2016, at 4:19 PM, Farner Simon (farnesim) <fa...@students.zhaw.ch> wrote:
> 
> Hello Ari
> 
> Thank you for replying. I worked through the tutorial bevor we picked Cayenne as ORM. I allready have a working mapping that has allready been deployed to our dev environment and MySQL server. Thus fare everything went smooth.
> 
> What I am trying to achive is this: https://cayenne.apache.org/docs/3.0/modeling-vertical-inheritance.html The section in the 4.0 Version of the Guid is empty so I assumed this is still valid.
> 
> I hope this gets sorted into the right thread, because I did the registration wrong the first time :/


Re: Modeling vertical inheritance

Posted by "Farner Simon (farnesim)" <fa...@students.zhaw.ch>.
Hello Ari

Thank you for replying. I worked through the tutorial bevor we picked Cayenne as ORM. I allready have a working mapping that has allready been deployed to our dev environment and MySQL server. Thus fare everything went smooth.

What I am trying to achive is this: https://cayenne.apache.org/docs/3.0/modeling-vertical-inheritance.html The section in the 4.0 Version of the Guid is empty so I assumed this is still valid.

I hope this gets sorted into the right thread, because I did the registration wrong the first time :/

Re: Modeling vertical inheritance

Posted by Aristedes Maniatis <ar...@maniatis.org>.
On 28/03/2016 6:51am, Simon Farner wrote:
> 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.

If you are new to Cayenne, can I recommend you first work your way through the tutorial [1]. That might be an easier way to get started and understand the basic ideas.

Ari


[1] https://cayenne.apache.org/docs/4.0/tutorial/

-- 
-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

Re: Modeling vertical inheritance

Posted by Andrus Adamchik <an...@objectstyle.org>.
It is totally ok to use 4.0.M3. I am still going to look at the DataMap.

Andrus

> On Mar 29, 2016, at 4:07 PM, Simon Farner <s....@bluewin.ch> wrote:
> 
> 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....@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
>>> 


Re: Modeling vertical inheritance

Posted by Michael Gentry <bl...@gmail.com>.
Hi Simon,

It is probably OK (Cayenne Milestones/Betas tends to be relatively stable,
but there is a greater chance for issues).  I was more concerned with a
3.1->4.0M3 issue being present, but since you started out with 4.0M3, best
to stick with it.  We'll help you figure out the problem you are having, or
if a Cayenne issue, fix it.

Thanks,

mrg


On Tue, Mar 29, 2016 at 9:07 AM, Simon Farner <s....@bluewin.ch> wrote:

> 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....@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
> > >
>

Re: Modeling vertical inheritance

Posted by Simon Farner <s....@bluewin.ch>.
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....@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
> > 

Re: Modeling vertical inheritance

Posted by Michael Gentry <bl...@gmail.com>.
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....@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/uw82cl1yxkl3
> ohk/cayenne-project.xml?dl=0
>
> Best regards and thanks to everybody for helping
> Simon
>