Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Inheritance influences orderBy result


I'm experiencing incorrectly ordered query results, could someone tell
me if this is a known issue? If it is known, Is there a clean

My model can be resembled by:

Animal with 2 subclasses: Dog and Horse

I query "select a from Animal a order by name asc" and I get ordered
dogs followed by ordered horses. I would expect a list ordered

When I look at the queries with logging on Finest I notice 2 selects
to join the tables, the queries already include the order by clause,
and it seems that the two results are appended.

example result:

Dog: fred
Dog: jack
Horse: ed
Horse: harry

while I expect:

Horse: ed
Dog: fred
Horse: harry
Dog: jack

My inheritance strategy is <inheritance strategy="JOINED" />

Thank you,


Back to the top