DDC-33: Remove allowPartialObjects option. #42

Closed
opened 2026-01-22 12:25:10 +01:00 by admin · 1 comment
Owner

Originally created by @doctrinebot on GitHub (Oct 7, 2009).

Jira issue originally created by user romanb:

I think this option will cause unnecessary confusion. The best solution is to always disallow partial objects, yet you can force partial objects on individual object queries to increase performance if necessary. This is much simpler for the user than to remember all the details of how the current option affects certain behavior. Also, with the current default behavior of partial objects everywhere, some standard operations can unexpectedly not work, like adding an object to a collection of a managed object (but the collection itself was not fetched yet). As a result the collection will not be wrapped by doctrine with a PersistentCollection and modifications are lost.
There are more of such examples.

I will do this myself and I think this can even be done with full backwards compatibility (though its not strictly necessary since we're still in alpha).

This should be done before entering beta.

Originally created by @doctrinebot on GitHub (Oct 7, 2009). Jira issue originally created by user romanb: I think this option will cause unnecessary confusion. The best solution is to always disallow partial objects, yet you can force partial objects on individual object queries to increase performance if necessary. This is much simpler for the user than to remember all the details of how the current option affects certain behavior. Also, with the current default behavior of partial objects everywhere, some standard operations can unexpectedly not work, like adding an object to a collection of a managed object (but the collection itself was not fetched yet). As a result the collection will not be wrapped by doctrine with a PersistentCollection and modifications are lost. There are more of such examples. I will do this myself and I think this can even be done with full backwards compatibility (though its not strictly necessary since we're still in alpha). This should be done before entering beta.
admin closed this issue 2026-01-22 12:25:10 +01:00
Author
Owner

@doctrinebot commented on GitHub (Oct 15, 2009):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Oct 15, 2009): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#42