Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Cannot Reproduce
-
Affects Version/s: None
-
Fix Version/s: 1.0.0ALPHA2
-
Component/s: Document Manager
-
Labels:None
Description
I have the following documents:
Product:
product_id
sellable (dbref)
Sellable:
product (dbref)
seller (dbref)
Seller:
name
If I create a new Sellable for a seller the seller gets scheduled for update even if nothing has changed.The document persister correctly doesn't try to actually execute the update but Lifecycle events still get called. The flow is:
1. Schedule for update
2. Call _executeUpdate
3. Call preUpdate
4. Call BasicDocumentPersister::update(), which does nothing because of no actual changes
5. Call postUpdate.
preUpdate and postUpdate being called when there's no actual changes is causing problems. It seems like the proper course of action would be to either not schedule the document for update or check if there's any actual changes before calling preUpdate and postUpdate.
I will take a look at this. Can you try creating a test case that reproduces the issue?