DDC-21: Already fetched associations should not be overriden by subsequent queries. #2784

Closed
doctrinebot opened this Issue Sep 25, 2009 · 3 comments

1 participant

@doctrinebot

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

Comment created by romanb:

This behavior is already correct for single-valued associations but not for collections. Needs to be fixed in ObjectHydrator.

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot doctrinebot added this to the 2.0-ALPHA3 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment