cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: Persistence and inheritance : a noob question
Date Fri, 01 Dec 2006 11:13:26 GMT
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).


On Nov 29, 2006, at 5:14 PM, Tomi N/A wrote:
> 2006/11/28, Malcolm Edgar <>:
>> 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.

View raw message