cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Migrate Horizontal Inheritance (EOF) to Cayenne
Date Sat, 13 Apr 2019 14:45:30 GMT
Hi Jérémy,

Yes, there's still no horizontal inheritance in Cayenne. It wasn't attractive from performance
standpoint, so nobody really advocated for it to happen so far. Now that I've finally met
a number of people who care about "horizontal", we are thinking of prioritizing it. So it
may happen (relatively) soon.

> Is the game over ?

Not really. You can just map all those tables as separate entities. Queries may be a little
more annoying to write (especially if you have relationships *to* the base abstract entity),
but it shouldn't be a show stopper. And outside of persistence operations the objects can
all implement a single interface, so once you get them out of DB, you'll have the ability
to treat them as children of a single ancestor. 

Andrus



> On Apr 13, 2019, at 4:26 PM, Jérémy DE ROYER <jeremy.deroyer@ingencys.net> wrote:
> 
> Hello,
> 
> I’m trying to migrate (eo)models using horizontal inheritance (over multiple frameworks)
but without any success : it’s not possible to generate the Java classes using Cayenne Modeler.
> 
> I did a test with only one entity (and table) : that works great (and easy).
> 
> I’ve created a second entity (and  table) : that works great and easy.
> 
> I’ve set up an horizontal inheritance between the two entities (and table) : Cayenne
forces me to use the same table for both entities
> 
> In the 3.0's doc, I’ve read : “As of this writing Cayenne does not support horizontal
inheritance. It may in the future”.
> 
> Is it still true in the 4.0 ? 4.1 ? Is the game over ? (as I can not use vertical inheritance)
🤕
> 
> Thank’s,
> 
> Jérémy


Mime
View raw message