Doctrine FAQ
- Can I generate my Doctrine schema/models from an existing database?
- Can I specify my mapping in something other than PHP??
- Can I use Doctrine with a MVC Framework?
- Can I use Raw/Native SQL with Doctrine?
- Does Doctrine support inheritance?
- Does Doctrine support many2many relationships?
- How can I log all my executes queries?
- How can I update a record without retrieving it first?
- How can I upgrade my database when my schema changes?
- How do I lazy load my model classes?
- How do I submit a bug?
- How do I use Doctrine with the symfony MVC framework?
- How do I use Doctrine with the Zend Framework?
- What is the best way to get started with Doctrine?
- Why does DQL not recognize my DB functions?
-
Can I generate my Doctrine schema/models from an existing database?
Yes. Doctrine offers a database import feature which will generate your php models or yaml schema files from an existing database.
-
Can I specify my mapping in something other than PHP??
Yes. Doctrine offers the ability to optionally specify your mapping as a set of YAML files. You can read about yaml files here.
-
Can I use Doctrine with a MVC Framework?
Yes. Doctrine has already been successfully integrated with several well known PHP frameworks. You can check the list with links to tutorials here.
-
Can I use Raw/Native SQL with Doctrine?
Yes. Doctrine offers the ability for you to write raw SQL statements and manually map the data for hydration. You can read more about Native SQL here.
-
Does Doctrine support inheritance?
Yes. Currently Doctrine supports three types of inheritance and they are: Simple, Concrete and Column Aggregation inheritance. You can read more about inheritance here.
-
Does Doctrine support many2many relationships?
Yes. Doctrine fully supports many2many relationships, as well as self referencing ones.
-
How can I log all my executes queries?
Doctrine has the ability to log all executed queries on a connection instance by using the connection profiler which can be read about in the manual here.
-
How can I update a record without retrieving it first?
Doctrine offers the ability to specify update statements with DQL. You can read about it here.
-
How can I upgrade my database when my schema changes?
Doctrine offers this functionality via the migrations feature. It allows you to programatically write upgrade classes which alter an existing database schema. Doctrine also offers features which will automatically generate these upgrade classes for you.
-
How do I lazy load my model classes?
Doctrine offers a method for lazy loading models called conservative model loading. You can read about what it is and how you can take advantage of it here.
-
How do I submit a bug?
You can submit a bug via our trac system. It is required that you register to submit a bug. It also is recommended that you write a failing test case for your issue, you can read about test cases here.
-
How do I use Doctrine with the symfony MVC framework?
You can read about how to integrate Doctrine with frameworks like the symfony here. Doctrine has been successfully integrated with several well known PHP frameworks.
-
How do I use Doctrine with the Zend Framework?
You can read about how to integrate Doctrine with frameworks like the Zend Framework here. Doctrine has been successfully integrated with several well known PHP frameworks.
-
What is the best way to get started with Doctrine?
The best way to get started is to read the The Guide to Doctrine and follow the code examples.
-
Why does DQL not recognize my DB functions?
Doctrine by default runs with portability on. In order for you to execute dbms specific functions you must turn portability off. You can read about portability here.
