You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Andrus Adamchik <an...@objectstyle.org> on 2006/12/01 12:13:26 UTC

Re: Persistence and inheritance : a noob question

Performance wise, single-table inheritance is the winner, while  
multiple table inheritance (vertical usually with one common table  
and a specific table per class) is the most flexible solution IMO, so  
both have their uses.

Cayenne currently supports the first scenario, and will support the  
second in 3.0 (haven't tried current composite vertical inheritance  
workaround myself, so I can't comment on it).

Andrus



On Nov 29, 2006, at 5:14 PM, Tomi N/A wrote:
> 2006/11/28, Malcolm Edgar <ma...@gmail.com>:
>> My 2 bits worth..
>>
>> I find the single table model works better than modeling class
>> inheritance through multiple tables. The reason being you have less
>> referential integrity constraints to worry about when  using a single
>> table
>
> Still, if you have e.g. people, devices, rooms and buildings and you
> want to schedule their use, you might construct a GenericResource
> table with a couple of it's own attributes and consider everything
> else a specialization of the GenericResource.
> What I mean to say is that obviously there are cases where separate
> tables are the only sensible conclusion. I'm keen to know: does
> cayenne handle that scenario?
>
> Cheers,
> t.n.a.
>


Re: Re: Persistence and inheritance : a noob question

Posted by Tomi N/A <he...@gmail.com>.
2006/12/1, Michael Gentry <bl...@gmail.com>:
> Magic 8Ball, will Cayenne have multi-table inheritance in 2006?
> "Outlook not so good."
>
> Well, there you have it.

I was really hoping for "summer 2007", but hey, I'll take this New
Year's Eve. :)

t.n.a.

Re: Re: Persistence and inheritance : a noob question

Posted by Michael Gentry <bl...@gmail.com>.
Magic 8Ball, will Cayenne have multi-table inheritance in 2006?
"Outlook not so good."

Well, there you have it.


On 12/1/06, Andrus Adamchik <an...@objectstyle.org> wrote:
>
> On Dec 1, 2006, at 6:45 PM, Tomi N/A wrote:
>
> >> Cayenne currently supports the first scenario, and will support the
> >> second in 3.0 (haven't tried current composite vertical inheritance
> >> workaround myself, so I can't comment on it).
> >
> > Is there a due date...or a due week...month...year?
>
> Oh please! There are no due dates here :-)
>
> Andrus

Re: Persistence and inheritance : a noob question

Posted by Andrus Adamchik <an...@objectstyle.org>.
On Dec 1, 2006, at 6:45 PM, Tomi N/A wrote:

>> Cayenne currently supports the first scenario, and will support the
>> second in 3.0 (haven't tried current composite vertical inheritance
>> workaround myself, so I can't comment on it).
>
> Is there a due date...or a due week...month...year?

Oh please! There are no due dates here :-)

Andrus

Re: Persistence and inheritance : a noob question

Posted by Tomi N/A <he...@gmail.com>.
2006/12/1, Mike Kienenberger <mk...@gmail.com>:

> While there's no due date, it's a requirement for JPA, so I'd guess it
> will happen sooner rather than later :-)

That's good to know.

Cheers,
t.n.a.

Re: Persistence and inheritance : a noob question

Posted by Mike Kienenberger <mk...@gmail.com>.
On 12/1/06, Tomi N/A <he...@gmail.com> wrote:
> > Cayenne currently supports the first scenario, and will support the
> > second in 3.0 (haven't tried current composite vertical inheritance
> > workaround myself, so I can't comment on it).
>
> Is there a due date...or a due week...month...year?

While there's no due date, it's a requirement for JPA, so I'd guess it
will happen sooner rather than later :-)

Re: Persistence and inheritance : a noob question

Posted by Tomi N/A <he...@gmail.com>.
2006/12/1, Andrus Adamchik <an...@objectstyle.org>:
> Performance wise, single-table inheritance is the winner, while
> multiple table inheritance (vertical usually with one common table
> and a specific table per class) is the most flexible solution IMO, so
> both have their uses.

At the moment, I'm not that concerned about performance: it's more
that I feel rather limited by the framework, now that I've gotten used
to doing everything with it. :)
There will be situations where multitable inheritence will be a
necessity so I'm trying to plan in advance.

> Cayenne currently supports the first scenario, and will support the
> second in 3.0 (haven't tried current composite vertical inheritance
> workaround myself, so I can't comment on it).

Is there a due date...or a due week...month...year?

Cheers,
t.n.a.