Re: (news) Re: Migrate Horizontal Inheritance (EOF) to Cayenne
Jérémy DE ROYER <[email protected]>
| Newsgroups | gmane.comp.java.cayenne.user |
|---|---|
| Message-ID | <[email protected]> |
Andrus, I will be happy to move our frameworks / apps using Cayenne. If the Cayenne team need helpers / testers / others, just tell me đ Thank's JĂ©rĂ©my Le 18 fĂ©vr. 2020 Ă 12:53, Andrus Adamchik <[email protected]<mailto:[email protected]>> a Ă©crit : Hi JĂ©rĂ©my, There was some work done in 4.2 to make the underlying runtime more amendable to the future implementation. But the actual implementation still needs to be done. Andrus On Feb 16, 2020, at 8:47 PM, JĂ©rĂ©my DE ROYER <[email protected]<mailto:[email protected]>> wrote: Dear developers, I made small apps using cayenne (with webobjects and bootique too). It works as expected. Iâve tried to change the eomodels of our apps with horizontal inheritance in about 10 frameworks / eomodel. I did not success : we could update the app for the main classes but itâs not that easy for inheritance accross relationships. So, if you need any testers to advance the implementation the horizontal inheritance, please let me know. For our company, it's the last point to migrate our apps with Cayenne. JĂ©rĂ©my Le 13 avr. 2019 Ă 17:18, JĂ©rĂ©my DE ROYER <[email protected]<mailto:[email protected]><mailto:[email protected]>> a Ă©crit : Hi Andrus, We will do the migration during the summer, so it depends how long is « soon » đ We built our apps as a burger with a lot of abstract classes on the main(s) framework to be sure that every (upper) frameworks know about each other classes even if not (really) implemented. As an example, We have (abstract) classes called « AbstractCompany » and « AbstractCustomer » on the main framework On the middle commercial framework we implement classes « Invoice » and « Quote » that are linked to « AbstractCompany » and « AbstractCustomer ». And⊠on the « e-business » framework we do implement the classe « Customer » (that extends « AbstractCustomer ») And⊠on the « crm » framework we do implement the classe « Company » (that extends « AbstractCompany ») So without any effort, the « Invoice » and « Quote » are able to see/select/link « customer » and « company », just with adding the framework(s) to the (final) customer app. I donât know if itâs clear enough but I hope it may help to understand the importance of horizontal inheritance as we canât rewirte all our logic. JĂ©rĂ©my Le 13 avr. 2019 Ă 16:45, Andrus Adamchik <[email protected]<mailto:[email protected]><mailto:[email protected]><mailto:[email protected]>> a Ă©crit : 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 <[email protected]<mailto:[email protected]><mailto:[email protected]><mailto:[email protected]>> 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