Details
Description
New entities with Notify strategy for changes and with GeneratedValue(strategy="AUTO") never get the onPropertyChanged listener attached to them. That happens because of the logic in the UOW::scheduleForInsert($entity) method. The last condition in it "isset($this->entityIdentifiers[$oid])" is never true because the identifier is not set and therefore the code that attaches the PropertyChangedListener in addToIdentityMap is never run.
Activity
Oleg Namaka
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Description | For entities with Notify strategy of changes tracking new entities with GeneratedValue(strategy="AUTO") never get the onPropertyChanged listener attached to them. That happens because of the logic in the UOW::scheduleForInsert($entity) method. The last condition in it "isset($this->entityIdentifiers[$oid])" is never true because the identifier is not set and therefore the code that attaches the PropertyChangedListener in addToIdentityMap is never run. | New entities with Notify strategy for changes and with GeneratedValue(strategy="AUTO") never get the onPropertyChanged listener attached to them. That happens because of the logic in the UOW::scheduleForInsert($entity) method. The last condition in it "isset($this->entityIdentifiers[$oid])" is never true because the identifier is not set and therefore the code that attaches the PropertyChangedListener in addToIdentityMap is never run. |
Guilherme Blanco
made changes -
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Assignee | Benjamin Eberlei [ beberlei ] | Guilherme Blanco [ guilhermeblanco ] |
| Resolution | Won't Fix [ 2 ] |
Oleg Namaka
made changes -
| Resolution | Won't Fix [ 2 ] | |
| Status | Resolved [ 5 ] | Reopened [ 4 ] |
Benjamin Eberlei
made changes -
| Workflow | jira [ 13626 ] | jira-feedback [ 14106 ] |
Benjamin Eberlei
made changes -
| Workflow | jira-feedback [ 14106 ] | jira-feedback2 [ 15970 ] |
Benjamin Eberlei
made changes -
| Status | Reopened [ 4 ] | Resolved [ 5 ] |
| Assignee | Guilherme Blanco [ guilhermeblanco ] | Benjamin Eberlei [ beberlei ] |
| Fix Version/s | 2.2.3 [ 10196 ] | |
| Fix Version/s | 2.2.1 [ 10194 ] | |
| Resolution | Fixed [ 1 ] |
Benjamin Eberlei
made changes -
| Workflow | jira-feedback2 [ 15970 ] | jira-feedback3 [ 19438 ] |
This list may be incomplete, as errors occurred whilst retrieving source from linked applications:
- Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DDC-1775, expand=changesets[-21:-1].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)
This is intentional to me.
According to code and documentation, PropertyChanged is supposed to operate over updates, never over inserts.
I experimented changing the code to also notify about changed during new and the consequences were very drastic. Internally, propertyChanged creates entityChangesets that implies an UPDATE.
Marking ticket as won't fix.