本文介绍了使用MongoDB时需要JPA吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对这两者很困惑.我在看剧!java框架,它说它使用JPA.我正在考虑使用 Play!和 MongoDB 第一次在一个项目中.我以前用过 JPA,但当时我用它来写入关系数据库(mysql).

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 不是关系型数据库,所以如果我想在 Play! 中使用它,我还需要 JPA 吗?还是只是 MongoDB 驱动程序?

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!

推荐答案

我认为 play 支持 JPA,但不需要 JPA.您可以完全忘记 JPA,使用您喜欢的任何 MongoDB API(其原生 API、Brendan 对 Morphia 的建议等).

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).

这篇关于使用MongoDB时需要JPA吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 05:37