Make Mongo accessor API pluggable

Bug #713025 reported by Oliver Gierke
6
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.

Tags: mongodb
Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

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
* subclass MongodbSerializer like MongodbSerializer for annotation based field name extraction
* create an annotation processor like MorphiaAnnotationProcessor

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.

Changed in querydsl:
status: New → In Progress
Changed in querydsl:
status: In Progress → Fix Committed
Revision history for this message
Oliver Gierke (ogierke) wrote :

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

Revision history for this message
Timo Westkämper (timo-westkamper) wrote :
Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

Released in 2.1.1

Changed in querydsl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.