Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] Properties from subclass added as not null to superclass table.
[Teneo] Properties from subclass added as not null to superclass table. [message #604008] Thu, 29 March 2007 14:07
Duncan Alexander is currently offline Duncan AlexanderFriend
Messages: 90
Registered: July 2009
Member
This is a multi-part message in MIME format.
--------------000405030101020600080007
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi Martin et al,

I am noticing an issue with multiple inheritance and Teneo whereby properties from a subclass are
being mapped into the superclass' table but set to NOT NULL. The result is that whenever a type is
inserted into the table which does not have a discriminator type of that specific subclass these
columns are NULL and an error is thrown from the DB.

- Setup: EMF 2.2, Teneo 0.75 with latest fixes, JDK 1.5, Hibernate 3.2

- Inheritance mapping is set to SINGLE_TABLE

- See attached diagram for model snippit

Looking in particular at CodedXSMeasure, this inherits from CodedMeasure and XSMeasure, CodedMeasure
is a Measure, which is a Component which in turn is an Identifiable. Identifiable is the main
class for this heirarchy and hence it maps to a table in the DB.

From what I understand the way Teneo handles multiple inheritance, the features which
CodedXSMeasure inherits from XSMeasure will be pulled into the subclass declaration for
CodedXSMeasure (as XSMeasure is the secondary superclass) and will hence be included in the
Identifiable table which holds everything within that heirarchy.

The features inherited from XSMeasure are references to a Code and a MeasureTypeDimension.

In the Teneo generated hibernate mapping, the COdedXSMeasure subclass contains these two properties
and there NOT NULL attribute is set to true, which corresponds to the model as these properties are
mandatory for subclasses of XSMeasure. But, once this is mapped to the single table inheritance
mapping for the DB I would assume that these fields would be NOT NULL and referential integrity
would be enforced by Hibernate (or Teneo) when these objects were being persisted.

Is this a bug or am I misunderstanding how this works ?

Duncan


--------------000405030101020600080007
Content-Type: image/gif;
name="MultipleInheritanceDiagram.gif"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="MultipleInheritanceDiagram.gif"

R0lGODlhEgFUAcQAAE1NPtDQpr29l+npuqenhY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Fb/ypGYHf8QnnKO2z5FmrgwszoKMRtGz83xc78UpCxFB7pa1G0YpsO4hFA/ qKsgZ2nJWVpz
OQ9EJDoDGZRPpuQOOLlTVM5yiuviMiQHQMxJjHZMPQ6fttpbR91uK6T6wDd+ 8oMkRuMd05z9
6ct6KaSDJWhIv71pttsPqEVx8LISXO0Zf7PYxJx4jY9KO+Gq0MD3zXB8zz5O BV9CPe3N1BLy
HvZKYJ2Lf316UrueUzdvwe5vX/jcfz75yrcF8zHvfE1zXgfL3zXtq8+5hwIz fP9+Qc5moWmQ
Sl/7uNcC+bufhNITp/imRr6woL+J6X8o4Ouy/zDxj3X9z9z4qPZ7ggB//1cQ flQlgLLWagp4
MAuIdQ24LpgDNML3gOpCORVFgRtngY2GgRmoeRxIBOuHUx/YgZ83go+3Uu9E fya4AgbYLS2o
LS94LTGYLDMYTSvYfjeIgzmILTvIgz24LT8IhEHoLUNYKf8SgkVIM/xCfiqY hAJjTfPkhDyj
c1Eoha9DhexnheKHhSKohbZzcRWDgGIIfDXifkJWg2Bghj2GhmFyZK1UVIAV Xx2BWXnVXSbR
bUgmIyakbqSBh08kh44Ehw4GQRoUWiE0WrcVPwYWEWGmbtVFW4Y4ZDcCRHfn QtO1XvQjWYWE
EVI0Rt81XHkII5RoXJpFWxaxiOwVXYx4YACWW6H8pXDBsz93t237BYr5o4l/ 2IrIRVyeKIds
ODEDlA2hlWB4hETvhUV6VIm6JVoStomwKCJquAvF5n+xSD7sk0q/CB9uGElF NYbeSAg9Eo03
lo0Mt41yJYjm6GyTmI4fQY71wY7qWIbfOI+AEI7wyG7reI/bY4/6iFb82I/H pocAqUqTSI8G
6YUImZAKuZAM2ZAO+ZAQGZESOZEUWZEWqSYhAAA7
--------------000405030101020600080007--
Previous Topic:[Teneo] Cannot add an item to a HibernatePersistableEList
Next Topic:JET: How to obtain GenClass?
Goto Forum:
  


Current Time: Tue Oct 20 12:46:50 GMT 2020

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

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

Back to the top