Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [Teneo] Containment Reference to Abstract Class with TABLE_PER_CLASS
[Teneo] Containment Reference to Abstract Class with TABLE_PER_CLASS [message #1745213] Thu, 06 October 2016 14:55
Eric Domeshek is currently offline Eric DomeshekFriend
Messages: 12
Registered: October 2016
Junior Member
Hi there. I'm new to Teneo/Hibernate but have been building a relatively complex model. I hit a snag and have managed to create a minimalist model that produces what I think is the same problem. Here's my best guess as to what the problem is:

If concrete class CClassX has a (multi-valued) containment reference to an abstract class AClass2 that has an (also abstract) ancestor AClass1 that has been given a TABLE_PER_CLASS annotation, then storing an instance of a concrete CClass2 that extends AClass2 into that containment reference of CClassX throws an exception, complaining that the AClass2 does not have a table.

[test.ecore attached that matches this description, though is slightly more elaborate to be a better reflects the layering/relationship in my real model. The problem is evidenced when storing an instance of Concrete3 into an instance of Concrete0's polyList field.]

Is this a known limitation (in particular, is it an instance of one of the listed limitations of TABLE_PER_CLASS)? Can you explain what Teneo is trying to do and why it is problematic? Is there a workaround (that preserves the nice table mapping, avoidance of tons of joins, and polymorphic query) other than getting rid of my containment declarations?

I suppose it's possible that containment is less critical if I'm not using EMF resources, but rather using HQL queries to pull objects into memory as I need them. Still, I think getting rid of containment will lead to extra explicit "save" calls, and I don't know what will happen WRT cascading deletes. (Though truth be told, I don't yet know whether Teneo would do what I think I want WRT deleting all contained sub-objects if there WERE still containment references).

Thanks for any insight/guidance.

--Eric
  • Attachment: test.ecore
    (Size: 2.02KB, Downloaded 163 times)
Previous Topic:[EMF] Lower bound 0 vs lower bound 1 of Reference
Next Topic:[CDO] CDOSession Concurreny Problems
Goto Forum:
  


Current Time: Fri Apr 26 05:57:52 GMT 2024

Powered by FUDForum. Page generated in 0.02817 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top