networkprofile networkprofile - 8 months ago 55
Java Question

Do you need JPA when using MongoDB?

I'm quite confused between those two. I'm looking at the Play! java framework and it says it uses JPA. I'm thinking about using Play! and MongoDB for the first time in a project. I've used JPA before, but I was using it back then to write to a relational database(mysql).

MongoDB is not a relational database, so if I want to use it with Play!, will I still be needing JPA? Or just the MongoDB driver?

I think I'm confusing quite a few things here, so if someone could help clarify things, I'd appreciate it!


I think play has support for JPA, but doesn't require JPA. You can just forget about JPA altogether and use whatever API to MongoDB you like (its native API, Brendan's suggestion of Morphia, etc).