Make Mongo accessor API pluggable
Bug #713025 reported by
Oliver Gierke
on 2011-02-04
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Querydsl |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The Mongo module currently uses Morphia as underlying Mongo access API. Would be cool if this was hidden behind a tiny abstraction so that one can use alternative Mongo Java APIs.
Timo Westkämper (timo-westkamper)
on 2011-02-06
Changed in querydsl: | |
status: | In Progress → Fix Committed |
Oliver Gierke (ogierke) wrote : | #2 |
Thanks for the quick fix. I#ll give it a try next week. Is there a way to grad a nightly snapshot or the like? I couldn't really find a current one in the Maven repo.
Cheers,
Ollie
Timo Westkämper (timo-westkamper) wrote : | #3 |
Here is a snapshot you can use : http://
Timo Westkämper (timo-westkamper) wrote : | #4 |
Released in 2.1.1
Changed in querydsl: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
A basic separation of Morphia and Mongodb parts has now been done. com.mysema. query.mongodb contains the general part and com.mysema. query.mongodb. morphia the Morphia specific part.
For an alternative ORM layer on top of Querydsl Mongodb you would need to
* subclass MongodbQuery like MorphiaQuery to supply transformer etc onProcessor
* subclass MongodbSerializer like MongodbSerializer for annotation based field name extraction
* create an annotation processor like MorphiaAnnotati
Study the Morphia layer to see how it's done. To use the dependency without Morphia just add an exclusion. Using code from the com.mysema. query.mongodb package is without Morphia references.