Affects Version/s: 5.2
Fix Version/s: None
Component/s: Platform > Persistence > Legacy Storage engine
MySQL Server 5.6.13
PHP 5.3.27 CLI, Zend 2.3.0, XDebug 2.2.3
If you call LocationService->updateLocation, and the details of your locationUpdateStruct match those already in the database, the LocationService will throw a NotFound exception, when in fact the record was found and no changes were made.
The issue stems from the way that the Legacy storage engine confirms the update:
By performing a row count of affected rows, and assuming that a 0 means the object was missing, a misleading exception is generated. To allow for idempotent operation, updating a record with its existing values shouldn't generate an exception.
A possible correction would be to check the struct against the location in the location service, before the storage engine.