Quantcast
Channel: Spring Community Forums - NoSQL
Viewing all articles
Browse latest Browse all 128

QueryDSL can not find all by an array of identifiers as parameter

$
0
0
I'm using spring-data-mongodb:1.2.0.RELEASE and QueryDSL:2.9.0.

I have a class as follow:

Code:

@Document(collection = "A")
    public class A {
        public BigInteger id;
    }

And a repository as follow:

Code:

@Repository
public interface ARepository extends MongoRepository<A, BigInteger>, QueryDslPredicateExecutor<A>


When I'm querying me repository as follow:
Code:

QA.a.id.eq(a.id)
All is fine, I can see in the mongo db log the next query:

Code:

query db.A query: { _id: ObjectId('51b8a1dfea34feab29624713') }
But when I'm quering with an array of identifiers

Code:

QA.a.id.in(a.id,a.id)
I get nothing.
I can see in the mongo log that the query is:

Code:

command db.$cmd command: { count: "A", query: { _id: { $in: [    "25291516816863698974474381015",      "25291516816863698974474381015" ] } } }
Which is not using the ObjectId wraping.
So, is it a bug on ?

Viewing all articles
Browse latest Browse all 128

Trending Articles