Big problem MongoDb and QuerysDSL
We are using the last builds from the repositorys with QueryDSL 2.5
We have a POJO as Mongo entity with a String as id property.
The problem is that when we insert the entity with the id property not set, mongodb autogenerate an ObjectId on the property "_id". When we try to query on that property with Querydsl we have to use a String o List<String>
example :
Code:
List<String> list = new ArrayList<String>();
list.add("4faa47ab3a9b9ee0910fe19d");
Iterable<Course> result = courseContentDao.findAll(QCourse.course.id.in(list));
The id "4faa47ab3a9b9ee0910fe19d" exists in MongoDb but the result is always empty because MongoDb has ObjectId as id.
We can not use List<ObjectId> because Querydsl expects List<? extends String> as parameter.
Any solution for this???
Thanks a lot