Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [eclipselink-users] Customizable Query Result Sorter


There is no special support for ordering the result beyond the ORDER BY syntax in JPQL. I would recommend writing a simple comparator that would take the same set of values and use this comparator to re-order the resulting collection after it is returned from EclipseLink.


-----Original Message-----
From: Mohsen Saboorian [mailto:mohsens@xxxxxxxxx]
Sent: Sunday, August 03, 2008 4:18 AM
To: EclipseLink User Discussions
Subject: [eclipselink-users] Customizable Query Result Sorter


I have a JPA query with IN statement. Something like this: SELECT e
FROM Entity e WHERE IN (3, 1, 2). I want to keep result order
same as the order specified in IN statement.

1. Is there any special hint to return this query in the same order as
specified in IN, i.e. = 3, = 1, = 2?
2. Is this possible to write a customized query result sorter in EclipseLink?

eclipselink-users mailing list

Back to the top