1
0
mirror of synced 2025-01-09 18:47:10 +03:00
Doctrine 2 Object Relational Mapper (ORM)
Go to file
Mathieu De Zutter 2ead9e23ab Fix merging of entities with associations to identical entities.
Without this patch, when an entity that refers multiple times to the same
associated entity gets merged, the second references becomes null.

The main issue is that even though doMerge returns a managed copy, that value
is not used while cascading the merge. These identicial entities are already
detected through the visitor map, but they are ignored.  There should be some
refactoring so cascadeMerge calls a function that checks if the parent must be
updated, based on the return value of its call to doMerge.  However, this patch
tries to impact the code as little as possible, and only introduces a new
function to avoid duplicate code.

The secondary issue arises when using inverted associations. In that case, it
is possible that an entity to be merged is already merged, so the the visitor
map is looked up by the hash of a managed copy instead of the original entity.
This means that in this case the visitor map entries should also be set to the
entity, instead of being set to 'true'.
2014-11-11 12:12:25 +01:00
bin Fix the composer autoload paths for the doctrine CLT 2014-07-24 09:52:55 -04:00
docs Merge pull request #1027 from PowerKiKi/feature-partial-indexes 2014-11-05 13:19:29 +01:00
lib Fix merging of entities with associations to identical entities. 2014-11-11 12:12:25 +01:00
tests Test case for merging entities with associations to identical entities. 2014-11-11 12:12:25 +01:00
tools/sandbox Region cache clear commands 2013-12-16 11:05:05 -05:00
.coveralls.yml Simplify build matrix 2014-03-01 17:13:28 -05:00
.gitattributes Remove README.markdown from .gitattributes 2013-01-19 20:04:43 +01:00
.gitignore Added composer.lock to .gitignore 2013-03-07 14:12:10 +01:00
.gitmodules Removing submodules as of doctrine/doctrine2#570 2013-02-15 18:33:29 +01:00
.travis.yml Allowing failures on hhvm-nightly, as the build chokes on composer installation for now (unrecognized console flags) 2014-06-07 15:11:51 +02:00
build.properties New Build process 2013-09-07 12:56:49 +02:00
build.properties.dev Add support to distribute the XSD to a given directory during build process 2011-08-27 13:23:17 +02:00
build.xml New Build process 2013-09-07 12:56:49 +02:00
composer.json #1120 - downgrading requirement for symfony/console to ~2.3 2014-10-20 18:51:39 +02:00
CONTRIBUTING.md Update CONTRIBUTING.md 2013-12-14 11:29:07 +01:00
doctrine-mapping.xsd Refactor partial into options array 2014-07-22 10:32:31 +09:00
LICENSE LGPL => MIT 2012-05-26 14:37:00 +02:00
phpunit.xml.dist Fixed typos 2013-03-11 00:08:58 +00:00
README.markdown Remove badges 2014-01-20 09:36:15 +01:00
run-all.sh Fixed typos 2013-03-11 00:08:58 +00:00
SECURITY.md Add SECURITY.md and a chapter on security assumptions in Doctrine ORM. 2014-02-21 16:12:32 +01:00
UPGRADE.md #1159 - adding UPGRADE.md notes for Doctrine\ORM\Repository\DefaultRepositoryFactory becoming final 2014-10-14 01:48:25 +02:00

Doctrine 2 ORM

Master: Build Status 2.4: Build Status 2.3: Build Status 2.2: Build Status 2.1: Build Status

Master: Coverage Status

Doctrine 2 is an object-relational mapper (ORM) for PHP 5.3.2+ 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 Hibernates HQL. This provides developers with a powerful alternative to SQL that maintains flexibility without requiring unnecessary code duplication.

More resources: