Issue Details (XML | Word | Printable)

Key: MODM-22
Type: Bug Bug
Status: Resolved Resolved
Resolution: Cannot Reproduce
Priority: Major Major
Assignee: Jonathan H. Wage
Reporter: Steven Surowiec
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Doctrine MongoDB ODM

Document incorrectly scheduled for update

Created: 28/Jun/10 04:45 PM   Updated: 19/Jul/10 11:52 PM
Component/s: Document Manager
Affects Version/s: None
Fix Version/s: 1.0.0ALPHA2


 Description  « Hide
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.



 All   Comments   Change History   FishEye      Sort Order: Ascending order - Click to sort in descending order
Jonathan H. Wage added a comment - 05/Jul/10 12:25 PM
I will take a look at this. Can you try creating a test case that reproduces the issue?

Jonathan H. Wage added a comment - 13/Jul/10 01:27 PM
Bulat, is this not fixed?

Jonathan H. Wage added a comment - 19/Jul/10 03:49 PM
Any chance of a test case? Could you provide the documents you are using?