Opened 9 years ago

Closed 6 years ago

#11470 closed defect (wontfix)

JsonRestStore and creating items with parents

Reported by: John Kelly Owned by: Kris Zyp
Priority: blocker Milestone: 1.9
Component: DojoX Data Version: 1.3.2
Keywords: JsonRestStore cid parentItem Cc:
Blocked By: Blocking:

Description

I'm having an issue with the following datastore API when used in conjunction with a JsonRestStore? (I've tried on both Dojo 1.3 and 1.4)

var newItem = store.newItem({

name: newname, type: "dummy"

}, {

parent: parentitem, attribute: "children"

});

If I create the new item with a parent, then store.save(), then fetch the store items, the identifier of the child comes back as, say, "cid:/jrstest/N12345", rather than just "N123435".

thanks in advance... John

Attached is a simple (and crude) HTML file which can be used to demonstrate the issue. It can be changed easily to work with any Restful store..

Assuming the store is empty (can be emptied using clearStore/saveStore buttons), the button order is

  • addItem
  • saveStore
  • addParentedItem
  • saveStore
  • fetchStoreItems

For the record, on create - if i get a POST with a request header containing "Content-Id: </jrstest/N234567>" my store sets the "Location: http://localhost:8080/jrstest/N234567" in the response header, as I think i should do..

Attachments (1)

JsonRestStoreTestbed.html (6.1 KB) - added by John Kelly 9 years ago.
JsonRestStore? testbed, which may be used to demonstrate bug

Download all attachments as: .zip

Change History (4)

Changed 9 years ago by John Kelly

Attachment: JsonRestStoreTestbed.html added

JsonRestStore? testbed, which may be used to demonstrate bug

comment:1 Changed 9 years ago by Jared Jurkiewicz

Owner: changed from Jared Jurkiewicz to kriszyp

comment:2 Changed 9 years ago by dante

Owner: changed from kriszyp to Kris Zyp

comment:3 Changed 6 years ago by dylan

Milestone: tbd1.9
Resolution: wontfix
Status: newclosed

dojo/data is deprecated in favor of dojo/store. Closing this as wontfix

Note: See TracTickets for help on using tickets.