Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DDC-691: doctrine.readOnly query hint #5202

Closed
doctrinebot opened this issue Jul 15, 2010 · 3 comments · Fixed by #7936
Closed

DDC-691: doctrine.readOnly query hint #5202

doctrinebot opened this issue Jul 15, 2010 · 3 comments · Fixed by #7936
Milestone

Comments

@doctrinebot
Copy link

Jira issue originally created by user romanb:

Setting such a query hint to TRUE should result in all entities being retrieved by that query to be read-only for the purposes of change-tracking. Note that the entities themselves need not necessarily be read-only in general.

This feature is a flush performance tweak that can be used to query for objects but not let the returned objects run through change-tracking on flush. Any other managed objects are tracked as usual so you can do a read-only query for 100 entities and persist a new entity in the same unit of work with optimal flushing performance.

@doctrinebot
Copy link
Author

Comment created by koc:

Any news?
Why query hint? What about temporary switching like fetch mode changing via query object?

@doctrinebot
Copy link
Author

Comment created by acid24:

Any news on this?

I think this is a must have feature. Thanks for all your work.

@doctrinebot doctrinebot added this to the 2.x milestone Dec 6, 2015
@Ocramius Ocramius removed this from the 2.x milestone Jan 12, 2017
beberlei added a commit that referenced this issue Nov 30, 2019
beberlei added a commit that referenced this issue Apr 18, 2021
* Rebase QueryHintReadOnly on 2.9.x

* Housekeeping: phpcs

* [GH-5202] Dont mark known entities as read only.

* [GH-5202] Not mark objects read only when proxy before.

* phpcs
@beberlei beberlei added this to the 2.9.0 milestone Apr 18, 2021
@beberlei
Copy link
Member

Merged into 2.9.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants