Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Question on unexpected JPQL "ORDER BY"-clause behaviour

I think you need to use JPQL outer joins.

On 1/28/2011 3:44 PM, t3_chris wrote:

I'v got an interesting behaviour with one of my JPQL queries. 
Here's the query:

SELECT c FROM Customer c 
ORDER BY, c.postalcode.postalcodeId,
  c.postalcode.postalcodeCity, c.name1, c.name2, c.name3

What I expected is that this query would find all customers, regardless if
c.postalcode is null or 
if it points to a postalcode object (regular SQL behaviour)
But it does only return those whose postalcode property is not null. 
Is this the normal and intended behaviour?

Is there any workaround for selecting all customers and apply the sorting as
shown above?

Best Regards,


Thanks and Regards
Rohit Banga
Member Technical Staff
Oracle Server Technologies

Back to the top