|
Re: [Teneo] How to set identity generator strategy for "TABLE_PER_CLASS" inheritan [message #752350 is a reply to message #751941] |
Wed, 26 October 2011 11:09 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi,
You can prevent the generated value to be set on the id, but I am not sure that you want to do that:
see the set_generated_value_on_id_feature option here
http://wiki.eclipse.org/Teneo/Hibernate/Configuration_Options
the only other solution is to annotate the model. You can also annotate using xml so that you don't change the ecore/xsd
model itself.
gr. Martin
On 10/26/2011 10:01 AM, Bernd Vogt wrote:
> Hello,
>
> I'd like to use "TABLE_PER_CLASS" as inheritance mapping strategy.
>
> Howerver, when I try to initialize the data base for my EPackage I get the follwoing error:
>
> "Exception in thread "main" org.hibernate.MappingException: Cannot use identity column key generation with
> <union-subclass> mapping for: Thing"
>
> My model contains an abstract class an one concrete sub-class. The Hibernate documentation is telling me that "the
> identity generator strategy is not allowed in unionsubclass inheritance". Ok... but I didn't figure out how to set
> another generator strategy???
>
> I suspect that I have to use the annotation GeneratedValue and MappedSuperclass on my ecore model... somehow... (I would
> like to avoid annotations)
>
> So, how to set another identity generator strategy that is valid for "TABLE_PER_CLASS"?
>
> Many thanks and best regards,
> Bernd
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03400 seconds