Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » discriminator type
discriminator type [message #92698] Tue, 07 August 2007 22:52 Go to next message
Jason Henriksen is currently offline Jason HenriksenFriend
Messages: 231
Registered: July 2009
Senior Member
Hi All,

I've looked around, but not been able to find this answer: Can I turn off
the discriminator type in the database? I'm working against a pre-existing
schema so I'm not able to have the dtype column. If I remove it, what
problems would I be causing?

Thanks,

Jason
Re: discriminator type [message #92715 is a reply to message #92698] Wed, 08 August 2007 09:21 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Jason,
The discriminator column is required in case of single table inheritance mapping strategy. This
because Hibernate needs to know type of object is stored in a specific record in the db.

In case of inheritance strategy joined then no discriminator column is added.
You can either set the inheritance mapping strategy globally (see the options) or use an Inheritance
annotation.

gr. Martin

Jason Henriksen wrote:
> Hi All,
>
> I've looked around, but not been able to find this answer: Can I turn off
> the discriminator type in the database? I'm working against a pre-existing
> schema so I'm not able to have the dtype column. If I remove it, what
> problems would I be causing?
>
> Thanks,
>
> Jason
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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
Re: discriminator type [message #609431 is a reply to message #92698] Wed, 08 August 2007 09:21 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Jason,
The discriminator column is required in case of single table inheritance mapping strategy. This
because Hibernate needs to know type of object is stored in a specific record in the db.

In case of inheritance strategy joined then no discriminator column is added.
You can either set the inheritance mapping strategy globally (see the options) or use an Inheritance
annotation.

gr. Martin

Jason Henriksen wrote:
> Hi All,
>
> I've looked around, but not been able to find this answer: Can I turn off
> the discriminator type in the database? I'm working against a pre-existing
> schema so I'm not able to have the dtype column. If I remove it, what
> problems would I be causing?
>
> Thanks,
>
> Jason
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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
Previous Topic:discriminator type
Next Topic:[Teneo / JPOX] java.lang.StringIndexOutOfBoundsException
Goto Forum:
  


Current Time: Fri Apr 19 00:34:14 GMT 2024

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

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

Back to the top