Cayenne Modeler Inheritance Warning

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Cayenne Modeler Inheritance Warning

Michael Gentry
In converting an application from 3.0 to 3.1, have a validation warning in
CM regarding a "Facility" abstract superclass which defines an "exhibit"
relationship which is used by the subclasses.  The warning is:

Usage of super entity's relationships 'Facility.exhibit' as reversed
relationships for sub entity is discouraged

The concrete subclasses have qualifiers similar to:

exhibit.itemExhibit.code = "foo"

They all utilize the "exhibit" relationship defined in the superclass to
identify the correct subclass.  Why is inheriting and using an abstract
superclass relationship a warning and discouraged, but inheriting and using
the abstract superclass attributes are OK and no warning?  I could, of
course, re-define these relationships in each subclass, but I'm wondering
why this warning is in place and if I'm overlooking something.

Thanks,

mrg
Reply | Threaded
Open this post in threaded view
|

Re: Cayenne Modeler Inheritance Warning

Andrus Adamchik
Does Facility.exhibit point to a sublcass of Exhibit?

Some background:

https://issues.apache.org/jira/browse/CAY-1600
https://lists.apache.org/thread.html/01f69b73b99651f6ecf96fc24176b0e2d4f63d5af08e2f764e6f12bf@1332798063@%3Cuser.cayenne.apache.org%3E

Andrus


> On Jun 8, 2017, at 6:30 PM, Michael Gentry <[hidden email]> wrote:
>
> In converting an application from 3.0 to 3.1, have a validation warning in
> CM regarding a "Facility" abstract superclass which defines an "exhibit"
> relationship which is used by the subclasses.  The warning is:
>
> Usage of super entity's relationships 'Facility.exhibit' as reversed
> relationships for sub entity is discouraged
>
> The concrete subclasses have qualifiers similar to:
>
> exhibit.itemExhibit.code = "foo"
>
> They all utilize the "exhibit" relationship defined in the superclass to
> identify the correct subclass.  Why is inheriting and using an abstract
> superclass relationship a warning and discouraged, but inheriting and using
> the abstract superclass attributes are OK and no warning?  I could, of
> course, re-define these relationships in each subclass, but I'm wondering
> why this warning is in place and if I'm overlooking something.
>
> Thanks,
>
> mrg

Reply | Threaded
Open this post in threaded view
|

Re: Cayenne Modeler Inheritance Warning

Michael Gentry
You were very close!  Exhibit has relationships to subclasses of Facility,
but not Facility itself.  I'll bet that is what is triggering it.

Thanks for the insight,

mrg


On Fri, Jun 9, 2017 at 1:48 AM, Andrus Adamchik <[hidden email]>
wrote:

> Does Facility.exhibit point to a sublcass of Exhibit?
>
> Some background:
>
> https://issues.apache.org/jira/browse/CAY-1600
> https://lists.apache.org/thread.html/01f69b73b99651f6ecf96fc24176b0
> e2d4f63d5af08e2f764e6f12bf@1332798063@%3Cuser.cayenne.apache.org%3E
>
> Andrus
>
>
> > On Jun 8, 2017, at 6:30 PM, Michael Gentry <[hidden email]> wrote:
> >
> > In converting an application from 3.0 to 3.1, have a validation warning
> in
> > CM regarding a "Facility" abstract superclass which defines an "exhibit"
> > relationship which is used by the subclasses.  The warning is:
> >
> > Usage of super entity's relationships 'Facility.exhibit' as reversed
> > relationships for sub entity is discouraged
> >
> > The concrete subclasses have qualifiers similar to:
> >
> > exhibit.itemExhibit.code = "foo"
> >
> > They all utilize the "exhibit" relationship defined in the superclass to
> > identify the correct subclass.  Why is inheriting and using an abstract
> > superclass relationship a warning and discouraged, but inheriting and
> using
> > the abstract superclass attributes are OK and no warning?  I could, of
> > course, re-define these relationships in each subclass, but I'm wondering
> > why this warning is in place and if I'm overlooking something.
> >
> > Thanks,
> >
> > mrg
>
>