Doctrine
Projects
ORM
DBAL
MongoDB ODM
Coding Standard
Collections
Common
Data fixtures
Event Manager
Inflector
Instantiator
Lexer
Migrations
PHPCR ODM
Persistence
RST Parser
View All
Development
Community
Contributor Workflow
Maintainer Workflow
Contribute to Website
Policies
GitHub
Styleguide
Sponsorship
Partners
Blog
Edit
Tutorials
Getting Started with Doctrine
Guide Assumptions
What is Doctrine?
What are Entities?
An Example Model: Bug Tracker
Project Setup
Obtaining the EntityManager
Generating the Database Schema
Starting with the Product Entity
Adding behavior to Entities
Adding Bug and User Entities
Implementing more Requirements
Queries for Application Use-Cases
List of Bugs
Array Hydration of the Bug List
Find by Primary Key
Dashboard of the User
Number of Bugs
Updating Entities
Entity Repositories
Conclusion
Getting Started: Database First
Getting Started: Model First
Working with Indexed Associations
Mapping Indexed Associations
Querying indexed associations
Outlook into the Future
Extra Lazy Associations
Enabling Extra-Lazy Associations
Composite and Foreign Keys as Primary Key
General Considerations
Primitive Types only
Identity through foreign Entities
Use-Case 1: Dynamic Attributes
Use-Case 2: Simple Derived Identity
Use-Case 3: Join-Table with Metadata
Performance Considerations
Ordering To-Many Associations
Override Field Association Mappings In Subclasses
Pagination
Separating Concerns using Embeddables
Initializing embeddables
Column Prefixing
DQL
Reference
Architecture
Using an Object-Relational Mapper
Requirements
Doctrine ORM Packages
The Common Package
The DBAL Package
The ORM Package
Terminology
Entities
Entity states
Persistent fields
Serializing entities
The EntityManager
Transactional write-behind
The Unit of Work
Installation and Configuration
Class loading
Obtaining an EntityManager
Setting up the Commandline Tool
Frequently Asked Questions
Database Schema
How do I set the charset and collation for MySQL tables?
Entity Classes
How can I add default values to a column?
Mapping
Why do I get exceptions about unique constraint failures during $em->flush()?
Associations
What is wrong when I get an InvalidArgumentException "A new entity was found through the relationship.."?
How can I filter an association?
I call clear() on a One-To-Many collection but the entities are not deleted
How can I add columns to a many-to-many table?
How can i paginate fetch-joined collections?
Why does pagination not work correctly with fetch joins?
Inheritance
Can I use Inheritance with Doctrine ORM?
Why does Doctrine not create proxy objects for my inheritance hierarchy?
EntityGenerator
Why does the EntityGenerator not do X?
Why does the EntityGenerator not generate inheritance correctly?
Performance
Why is an extra SQL query executed every time I fetch an entity with a one-to-one relation?
Doctrine Query Language
What is DQL?
Can I sort by a function (for example ORDER BY RAND()) in DQL?
Is it better to write DQL or to generate it with the query builder?
A Query fails, how can I debug it?
Basic Mapping
Creating Classes for the Database
Property Mapping
PHP Types Mapping
Doctrine Mapping Types
Identifiers / Primary Keys
Identifier Generation Strategies
Sequence Generator
Composite Keys
Quoting Reserved Words
Association Mapping
Many-To-One, Unidirectional
One-To-One, Unidirectional
One-To-One, Bidirectional
One-To-One, Self-referencing
One-To-Many, Bidirectional
One-To-Many, Unidirectional with Join Table
One-To-Many, Self-referencing
Many-To-Many, Unidirectional
Many-To-Many, Bidirectional
Owning and Inverse Side on a ManyToMany Association
Many-To-Many, Self-referencing
Mapping Defaults
Collections
Initializing Collections
Inheritance Mapping
Mapped Superclasses
Single Table Inheritance
Design-time considerations
Performance impact
SQL Schema considerations
Class Table Inheritance
Design-time considerations
Performance impact
SQL Schema considerations
Overrides
Association Override
Attribute Override