Details
Description
This issue is created automatically through a Github pull request on behalf of jappie:
Url: https://github.com/doctrine/doctrine2/pull/484
Message:
While executing updates on an entity scheduled for update without a change-set, an "Undefined index" notice is raised.
This issue will occur when you manually call $em()->getUnitOfWork()->scheduleForUpdate() on an entity that hasn't changed. The entity will be included in UnitOfWork::$entityUpdates, but because there are no changes, its oid will not be included in UnitOfWork::$entityChangeSets.
I know I'm misusing scheduleForUpdate() a bit in this case, but the notice can easily be prevented with a !empty().
Activity
Jasper N. Brouwer
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Affects Version/s | Git Master [ 10100 ] | |
| Affects Version/s | 2.3 [ 10185 ] | |
| Environment | OS X 10.8.2, PHP 5.3.17, Nginx 1.2.4 (php through FPM) | |
| Priority | Major [ 3 ] | Trivial [ 5 ] |
| Labels | unitofwork | |
| Component/s | ORM [ 10012 ] |
Jasper N. Brouwer
made changes -
| Description |
This issue is created automatically through a Github pull request on behalf of jappie:
Url: https://github.com/doctrine/doctrine2/pull/484 Message: While executing updates on an entity scheduled for update without a change-set, an "Undefined index" notice is raised. This issue will occur when you manually call `$em()->getUnitOfWork()->scheduleForUpdate()` on an entity that hasn't changed. The entity will be included in `UnitOfWork::$entityUpdates`, but because there are no changes, its oid will not be included in `UnitOfWork::$entityChangeSets`. I know I'm misusing `scheduleForUpdate()` a bit in this case, but the notice can easily be prevented with a `!empty()`. |
This issue is created automatically through a Github pull request on behalf of jappie:
Url: https://github.com/doctrine/doctrine2/pull/484 Message: While executing updates on an entity scheduled for update without a change-set, an "Undefined index" notice is raised. This issue will occur when you manually call {{$em()\->getUnitOfWork()\->scheduleForUpdate()}} on an entity that hasn't changed. The entity will be included in {{UnitOfWork::$entityUpdates}}, but because there are no changes, its oid will not be included in {{UnitOfWork::$entityChangeSets}}. I know I'm misusing {{scheduleForUpdate()}} a bit in this case, but the notice can easily be prevented with a {{!empty()}}. |
Fabio B. Silva
made changes -
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Resolution | Fixed [ 1 ] |
Benjamin Eberlei
made changes -
| Fix Version/s | 2.3.1 [ 10323 ] |