Opened 11 years ago
Closed 11 years ago
#13937 closed defect (wontfix)
CouchDBRestStore - problem with non object views
Reported by: | stsy | Owned by: | Jared Jurkiewicz |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | DojoX Data | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
CouchDBRestStore assumes that the value of all views is an object and tries to copy the id field and the loader into it. For simple views which contain for example only a string this dosen't work.
A hack fix would look as it follows:
Index: dojox/data/CouchDBRestStore.js =================================================================== --- dojox/data/CouchDBRestStore.js (Revision 26594) +++ dojox/data/CouchDBRestStore.js (Arbeitskopie) @@ -46,6 +46,9 @@ var self = this; for(var i = 0; i < rows.length;i++){ var realItem = rows[i].value; + if(typeof realItem != 'object'){ + realItem = {'value':rows[i].value}; + } realItem.__id= prefix + rows[i].id; realItem._id= rows[i].id; realItem._loadObject= dojox.rpc.JsonRest._loader;
Change History (2)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
No confirmation of CLA, therefore closing bug as wontfix.
Note: See
TracTickets for help on using
tickets.
Have you filed a CLA? If not, then your suggested fix cannot be looked and and will be deleted from the ticket in the next week or so to avoid IP issues.