Opened 9 years ago
Closed 9 years ago
#13715 closed defect (fixed)
dojo.data.ObjectStore delete error on
Reported by: | Bo Lorentsen | Owned by: | Kris Zyp |
---|---|---|---|
Priority: | high | Milestone: | 1.7 |
Component: | Data | Version: | 1.7.0b1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
When using ObjectStore? for adding new elements (newItem), and end up removing these very same objects again, before saving the store, we end up having an reference error in the save function when trying to save this store.
The reason are related to the dirty.old (loop at line 411), that will be set to false in this situation, and not an object, and this ends up making the code search for an (id) attribute in the false value, and that ends up in an exception.
Attachments (1)
Change History (10)
Changed 9 years ago by
Attachment: | objectstore_delete_fix.diff added |
---|
comment:1 Changed 9 years ago by
Owner: | changed from Jared Jurkiewicz to Kris Zyp |
---|
comment:2 Changed 9 years ago by
Druppy - generally you need to add a test case to tickets, an html file that reproduces the problem. Also, thanks for the patch, but please file a cla before attaching patches or else we can't look at them.
comment:5 Changed 9 years ago by
Milestone: | → 1.7 |
---|---|
Priority: | normal → high |
Resolution: | fixed |
Status: | closed → reopened |
Version: | → 1.7.0b1 |
This change breaks AMD and ComboBox. You are referencing the "dojo" global and your module isn't returning a value. Also, why are you extending Evented?
comment:7 follow-up: 8 Changed 9 years ago by
Is there a test case that is failing with the change? I didn't see any breakages using _autoComplete.html.
As far as Evented, ObjectStore? is a data store, so it emits events, and therefore it extends Evented. It emits "New", "Set", and "Delete".
comment:8 Changed 9 years ago by
Replying to kzyp:
Is there a test case that is failing with the change? I didn't see any breakages using _autoComplete.html.
For future reference, you need to look at the robot test scripts that control the top level (non-automated) test file, in this case tests/form/robot/!ComboBox_a11y.html and !ComboBox_mouse.html.
But anyway you fixed the problem by fixing that merge error.
comment:9 Changed 9 years ago by
Priority: | high → normal |
---|---|
Resolution: | → fixed |
Status: | reopened → closed |
This may be a fix for the problem at hand