哪个ORM与Symfony2一起使用? [英] Which ORM to use with Symfony2?

查看:176
本文介绍了哪个ORM与Symfony2一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Symfony2开始一个新的项目,我并不确定哪个ORM可以选择。我听说过有关Doctrine2的一些坏事,特别是在继承和DQL方面。似乎Propel是从死里复原的,但另一方面,它不会永久保存。



你有什么建议吗?

解决方案

我可以告诉你Propel是与Symfony2一起使用的最合适的ORM。它工作正常,没有计划停止它的活动。 Propel2项目正在比Propel 1.6.x(这真的很棒)更好。



不要犹豫,使用Propel,包括Sensio在内的许多用户实验室正在使用它!



以下是Symfony2的Propel文档: http://www.propelorm.org/documentation/#working_with_symfony2



注意:Stack Exchange有一个相关主题: a href =https://softwareengineering.stackexchange.com/questions/48760/should-i-choose-doctrine-2-or-propel-1-5-1-6-and-why/117078#117078> https ://softwareengineering.stackexchange.com/questions/48760/should-i-choose-doctrine-2-or-propel-1-5-1-6-and-why/117078#117078



我忘了一些点:




  • 行为是Propel的一部分,Doctrine2中没有人提供。这意味着Propel正式支持他们并提供支持/改进。不了解Doctrine。

  • 推进速度非常快。我同意Doctrine2比Propel更好地进行大量插入。

  • Propel是10岁,很稳定,被很多人使用。

  • 还没有使用Propel学习的另一种语言。

  • Propel2真正面向对象,感谢流畅的API。

  • Doctrine2 ORM不共享相同的API ODM,所以你可以用D2 ODM像D2 ORM和ODM一样使用Propel,这里没有任何优点。

  • Propel使用特定平台的代码生成,因此针对您的需求进行了优化,并且快速感谢运行时和发电机零件。



我在Doctrine2中有一些要点:




  • 注释

  • 整个代码是因为最近的。



问题不在于Doctrine DBAL,更多的是关于Doctrine ORM。 Propel2正在改进整个Propel 1.6.x代码。



哦,我使用了Doctrine2很长时间;)


I'm starting a new project with Symfony2 and I'm not really sure which ORM to choose. I've heard some bad things about Doctrine2, especially when it comes to inheritance and DQL. It seems like Propel is back from the dead, but on the other hand, there's no warranty that it will last forever.

Do you have any advice ?

解决方案

I can tell you Propel is the most suitable ORM to use with Symfony2. It works fine and no plan to stop activities on it. The Propel2 project is on its way to be better than Propel 1.6.x (which is ever really great).

Don't hesitate to use Propel, many users including Sensio Labs are using it !

Here is the Propel doc for Symfony2: http://www.propelorm.org/documentation/#working_with_symfony2

Note: There is a related topic on Stack Exchange: https://softwareengineering.stackexchange.com/questions/48760/should-i-choose-doctrine-2-or-propel-1-5-1-6-and-why/117078#117078

Some points I forgot:

  • Behaviors are part of Propel, no one provided in Doctrine2. That means Propel officially supports them and provides support/improvements. Not sure about Doctrine ones.
  • Propel is really fast. I agree Doctrine2 is better than Propel for mass insertions.
  • Propel is 10 years old, stable and used by a lot of people.
  • No yet another language to learn with Propel.
  • Propel2 is really object oriented, thanks to fluent APIs.
  • Doctrine2 ORM doesn't share the same API with ODM, so you may use Propel with D2 ODM like D2 ORM and ODM, there are no pros here.
  • Propel uses code generation for specific platforms, so it's optimized for your needs, and fast thanks to runtime & generator parts.

Some points I like in Doctrine2:

  • Annotations.
  • The whole code because it's quite recent.

The problem is not about Doctrine DBAL but more about Doctrine ORM. And Propel2 is on its way to improve the whole Propel 1.6.x code.

Oh, and I used Doctrine2 for a long time ;)

这篇关于哪个ORM与Symfony2一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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