discriminator type [message #92698] |
Tue, 07 August 2007 18:52  |
Eclipse User |
|
|
|
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 05:21  |
Eclipse User |
|
|
|
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 05:21  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.07555 seconds