Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Joined Inheritance, Discriminator Column, and Cross-Provider Compatibility

My question was for Tom / other seasoned EclipseLink developers.


On Wed, Aug 13, 2014 at 9:22 AM, J Grassel <fyrewyld@xxxxxxxxx> wrote:
Not yet, I’ve poked around a bit through the types involved with inheritance but don’t have enough to give an accurate estimate.  It seemed pragmatic to first determine the level of support for this before investing too many resources into it.

On Aug 13, 2014, at 9:19 AM, Rick Curtis <curtisr7@xxxxxxxxx> wrote:

I do not have any objection to augmenting EclipseLink to allow this. 
Off the cuff... do you have a feeling for how painful, or doable this might be?


On Wed, Aug 13, 2014 at 8:31 AM, Tom Ware <tom.ware@xxxxxxxxxx> wrote:
I do not have any objection to augmenting EclipseLink to allow this.

On 12/08/2014 2:42 PM, J Grassel wrote:
I would like to open a topic for discussion on the Eclipselink User forums regarding Eclipselink’s requirement for a discriminator column with joined strategy inheritance.  

The JPA 2.1 Specification makes the following statements:

----------

11.1.12 DiscriminatorColumn Annotation

For the SINGLE_TABLE mapping strategy, and typically also for the JOINED strategy, the persistence provider will use a type discriminator column. The DiscriminatorColumn annotation is used to define the discriminator column for the SINGLE_TABLE and JOINED inheritance mapping strategies.

and

11.2.2.7 DiscriminatorColumn

A discriminator column is generated for the SINGLE_TABLE mapping strategy and may optionally be generated by the provider for use with the JOINED inheritance strategy. The DiscriminatorColumn annotation may be used to control the mapping of the discriminator column. See section 11.1.12 for the rules that pertain to discriminator columns. 

----------

The language in the specification suggests that whether to require a discriminator column for joined strategy inheritance is up to the provider implementor.  Eclipselink’s documentation is pretty clear about it being required (http://wiki.eclipse.org/EclipseLink/Examples/JPA/Inheritance)  Other providers such as OpenJPA and Hibernate (http://stackoverflow.com/questions/2063515/why-eclipselink-is-adding-discriminator-column-for-joined-inheritance-strategy) can live without the discriminator column.

The discussion I want to initiate is not whether Eclipselink is wrong to require this (clearly it’s not given the Spec’s language), but whether Eclipselink should be enhanced to permit its absence in the interest of making migration from these other providers to Eclipselink easier, and to gauge developer community support for this enhancement.


_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipselink-users



--
Rick Curtis
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipselink-users



--
Rick Curtis

Back to the top