斯卡拉播放!使用定理或ORM [英] Scala Play! Using anorm or ORM

查看:115
本文介绍了斯卡拉播放!使用定理或ORM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

似乎Play提供了所有示例应用程序!框架利用主动脉来保持持久性.选择ORM而不是ORM的原因是什么?如果您使用的是ORM,则使用什么,为什么?

It seems that all the sample applications provided by the Play! framework make use of anorm for persistence. What is the reason for choosing anorm over an ORM? If you are using an ORM, what are you using and why?

推荐答案

我认为关于主动脉的大多数参数都列在相应页面.

I think most of the arguments for anorm are listed on the corresponding page in the documentation.

暂时,我个人更喜欢Scala和Play独立的数据访问层,因此我正在使用Ebean(如果建议使用默认值,则会使用JPA).

For the time being I personally prefer a Scala and Play independent data access layer, thus I am using Ebean (and would be using JPA, if it was the recommended default).

在我看来,能够在没有任何游戏依赖性的情况下使用模型是一个巨大的优势.另外,由于查询是用本地SQL表示的,因此Anorm似乎并没有提供太多的数据库独立性.

Being able to use the Models without any Play-dependencies is a huge plus, in my opinion. Also Anorm does not seem to offer much database independence, since the queries are expressed in native SQL.

这篇关于斯卡拉播放!使用定理或ORM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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