I used to use symfony1.4+propel to develop projects, and now I switch to symfony2.0, but I have never used doctrine, but the official default is doctrine and removes propel.
1. What are the advantages of using doctrine? Relative to prop. Projects are systems aspects.
2. When using prop, I found that group by is not very useful, right?
3.How does doctrine handle the many-to-many M:N relationship?
In addition, I post possible problems with doctrine, and I refer to others:
1. Documentation error. Use options to configure additional field options, such as unsigned and default attributes. Official documents and generated yml are specified directly on the field.
2. Foreign keys cannot specify unsigned or default
3. The table relationship is non-identifying relationship
grateful!
The functions supported by "standard" Doctrine are a collection of functions that are supported by all relational databases (MySQL, PostgrelSql, etc.) supported by PDO. In other words, anything that A supports but B does not support will not be supported by Doctrine by default. Yes, but Doctrine has good scalability and rich third-party code. I don’t know how to search it on Baidu. If I search Doctrine+Extensions on Google, I will gain a lot.
Doctrine’s many-to-many support is pretty good and sufficient.
You can still use Propel in Symfony 2, there is a dedicated chapter in the official website documentation.
Doctrine and Propel are both good (you can write the database package yourself, or you can be a good comrade). It’s better to choose each one. If you have to compare, you can cite some objective differences:
As mentioned before, the unsigned feature you mentioned cannot be used across databases, so naturally it is not supported by default. However, if necessary, there are many ways to do it, so I won’t go into this answer.
Default is not an attribute that can cross databases, but you can just define a default value for the mapped member variables in Doctrine's Entity class. What more can I ask for?
Doctrine’s promise is that it can be used across libraries. I think good code only does what it promises. From this point of view, Doctrine can still make people feel at ease. After all, there are still many people using PostgreSql or SQLite, so don’t use MySQL thinking to force consistency.