cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Gentry <>
Subject Re: Problem with inheritance
Date Mon, 12 Dec 2011 17:08:26 GMT
Hi Mathias,

I believe you are trying to use a currently unimplemented inheritance
mechanism.  Cayenne does not currently support horizontal
(multiple-table) inheritance:

There are tricks you can do to make working with multiple related
tables easier (such as adding getters/setters in your subclass to
reference the parent), but you cannot currently model this behavior


On Fri, Dec 9, 2011 at 3:00 AM, Mathias Clerc <> wrote:
> Hello,
> It seems like I have missed something in inheritance in Cayenne.
> I have one main table called "Element" with fields id (PK), name and description
> Another table "File" inherits from "Element" with fields ID(PK, FK on
> and path.
> When I do a context.performIteratedQuery(new
> SelectQuery(Element.class)) The query I see is :
> SELECT t0.ID, t0.DESCRIPTION, t0.NAME, t0.TYPE, t0.ID, t0.ID, t0.PATH
> I tried checking and unchecking the "To Dep PK" field for the relation in ID.
> What did I miss ?

View raw message