Skip to main content



      Home
Home » Eclipse Projects » EclipseLink » composite key order(is it important?)
composite key order [message #787658] Tue, 31 January 2012 16:05
Eclipse UserFriend
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.

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


Current Time: Fri Jul 04 14:21:21 EDT 2025

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

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

Back to the top