3.0.x | 2.14.x | 2.13.x |
---|---|---|
Surprisingly I found out that doctrine doesn't support relations in embeddable and silently ignores them. This fork adds support of manyToOne associations and is based on the following PRs: doctrine#1502 doctrine#5962
Add this to your project's root composer.json:
{
"repositories": [
{
"type": "git",
"url": "git@github.com:karser/doctrine-orm.git"
}
],
"require": {
"doctrine/orm": "dev-embeddable-relations-2.13 as v2.13.1",
}
}
Doctrine ORM is an object-relational mapper for PHP 7.1+ that provides transparent persistence for PHP objects. It sits on top of a powerful database abstraction layer (DBAL). One of its key features is the option to write database queries in a proprietary object oriented SQL dialect called Doctrine Query Language (DQL), inspired by Hibernate's HQL. This provides developers with a powerful alternative to SQL that maintains flexibility without requiring unnecessary code duplication.