mirror of
https://github.com/doctrine/orm.git
synced 2026-04-24 06:58:19 +02:00
DDC-21: Already fetched associations should not be overriden by subsequent queries. #29
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Sep 25, 2009).
Jira issue originally created by user romanb:
The discussion about this was brought up by DC-41. After checking the behavior of other ORMs (notably Hibernate), already fetched associations should not be overridden by subsequent queries, just like with other persistent state of already fetched entities. This saves performance and can assure a better integrity of the object model in-memory.
Entities and their associations that are already in-memory should only be refreshed if this is done explicitly either through EntityManager#refresh($entity) or through using the Query::HINT_REFRESH query hint on any query.
@doctrinebot commented on GitHub (Sep 25, 2009):
@doctrinebot commented on GitHub (Sep 25, 2009):
Comment created by romanb:
This behavior is already correct for single-valued associations but not for collections. Needs to be fixed in ObjectHydrator.
@doctrinebot commented on GitHub (Oct 9, 2009):
Issue was closed with resolution "Fixed"