Hi Joachim, Is this something that Embeddables might could help out with? Also, if you need to share common methods, you can create your own abstract class that inherits from DataObject and then in Cayenne Modeler, use the Superclass field for the ObjEntity to specify it. When you generate your classes, they'll inherit from whatever you specify.
mrg On Wed, Nov 30, 2011 at 12:47 PM, Durchholz, Joachim <[email protected]> wrote: > On http://cayenne.apache.org/doc/modeling-inheritance.html , I see this > statement: > "As of this writing Cayenne does not support horizontal inheritance. It may > in the future." > > Well, guess what, the first instance where I absolutely need inheritance does > require horizontal modeling. Two legacy tables happen to have a very similar > column structure and server very similar purposes, and since the processing > is complicated and accesses many fields of each record, having a common > superclass wired up would really simplify a lot of code. > > So the question is: Is there any realistic hope that this will be done soon? > Would outside help speed up things? > Limited help, unfortunately. I'll have to justify any time I sink into this > :-( > > The other approach might be faking a vertical/joined scenario using views. > However, I'd like to avoid that because I know that views tend to come with > their own cans of worms (updateability and lack of useful metadata). > > Regards, > Jo
