使用MongoDB时是否需要JPA? [英] Do you need JPA when using MongoDB?

查看:93
本文介绍了使用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并使用您喜欢的任何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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆