EclipseLink 2.5 JPA + MONGODB and ORDER BY [message #1066316] |
Tue, 02 July 2013 03:16  |
Eclipse User |
|
|
|
Hi,
im having trouble ordering items by 2 parameters. with either one of them it works just fine, but no matter which order i use when ordering after both, its the same in both cases, its allways sorted by lastname first.
here is what i try to do:
Query query = EntitiManager.createQuery("SELECT c FROM ContactHO WHERE c.companyId = :companyId ORDER BY c.firstNameNorm, c.lastNameNorm ASC");
The EclipseLink Debug Out looks fine:
19:24:54.181 FINE [org.eclipse.persistence.session.vfs:/D:/server/jboss-as-7.1.1.Final/bin/content/module-1-SNAPSHOT.war/WEB-INF/classes/_mongo.sql] (http--127.0.0.1-8180-1) Executing MappedInteraction()
spec => null
properties => {mongo.collection=CONTACTHO, mongo.limit=10, mongo.operation=FIND}
input => [DatabaseRecord(
CONTACTHO.COMPANYID => 5893435701058912613
$sort => DatabaseRecord(
CONTACTHO.FIRSTNAMENORM => 1
CONTACTHO.LASTNAMENORM => 1))]
but the mongo log, and the resulting sort order is mixed up:
Thu Jun 27 19:24:54.186 [conn21] runQuery called siba.CONTACTHO { $query: { COMPANYID: 5894184253551005013 }, $orderby: { LASTNAMENORM: 1, FIRSTNAMENORM: 1 } }
am i doing something wrong here or is this just a bug?
with kind regards
bastian
[Updated on: Wed, 03 July 2013 08:29] by Moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03272 seconds