Opened 8 years ago

Closed 8 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)

objectstore_delete_fix.diff (1.6 KB) - added by Bo Lorentsen 8 years ago.
This may be a fix for the problem at hand

Download all attachments as: .zip

Change History (10)

Changed 8 years ago by Bo Lorentsen

Attachment: objectstore_delete_fix.diff added

This may be a fix for the problem at hand

comment:1 Changed 8 years ago by Jared Jurkiewicz

Owner: changed from Jared Jurkiewicz to Kris Zyp

comment:2 Changed 8 years ago by bill

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:3 Changed 8 years ago by Bo Lorentsen

Ok, noted ... I will sign an CLA as quickly as possible.

comment:4 Changed 8 years ago by Kris Zyp

Resolution: fixed
Status: newclosed

In [26499]:

Fix identity determination and immediate deletion after creation error, fixes #13715 !strict

comment:5 Changed 8 years ago by bill

Milestone: 1.7
Priority: normalhigh
Resolution: fixed
Status: closedreopened
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:6 Changed 8 years ago by Kris Zyp

In [26571]:

Fix merge issue with declaration and avoid duplicate store notification events, refs #13715 !strict

comment:7 Changed 8 years ago by Kris Zyp

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 in reply to:  7 Changed 8 years ago by bill

Replying to kzyp:

Is there a test case that is failing with the change? I didn't see any breakages using _autoComplete.html.

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.

Version 0, edited 8 years ago by bill (next)

comment:9 Changed 8 years ago by bill

Priority: highnormal
Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.