Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » composite key order(is it important?)
composite key order [message #787658] Tue, 31 January 2012 21:05
Tony Rozga is currently offline Tony RozgaFriend
Messages: 2
Registered: January 2012
Junior Member
Hi, I have a @Inheritance(strategy=InheritanceType.JOINED) situation with a composite primary key and a base class + a subclass. There doesn't appear to be a way to tell Eclipselink about pk column order so I get two tables with keys in different order.

any way to fix that? We have a desired order based on selectivity. We are targeting SqlServer and this means we have two clustered keys in different column order...and these two tables get joined. I can't imagine that is good.

I played around with DescriptorCustomizer..setPrimaryKeyFields seems to work for the baseclass..the subclass however has an empty getPrimaryKeyFields and setAdditionalTablePrimaryKeyFields using a LinkedHashMap didn't work.

I guess an alternative is to not rely on automagic ddl and instead roll my own. However, I'm unsure about the implications of doing that, especially when it comes to the efficiency of any queries that get generated by EclipseLink.

Previous Topic:EclipseLink weaving fragment require-bundle version
Next Topic:Custom MetadataSource and Dynamic Weaving
Goto Forum:

Current Time: Sun Sep 27 18:02:21 GMT 2020

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

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

Back to the top