Quantcast

dstore with IndexedDB

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

dstore with IndexedDB

wildcatcs
I'm trying to use the indexedDB backed dstore and running into a few issues some of which I've been able to work around some of them.

My object model has an idProperty of "Id" (don't ask, not my choice).  But dstore is hard coding the keyPath to "id" unless the store config has a property idProperty:'<some name>'.  However setting this value in the dbConfig causes an exception on line 115 when it tries to create an index for "idProperty".

Anyone have any suggestions for a workaround for a custom idProperty short of modifying the code?

Another documentation issue with indexedDB, the docs say the the dbconfig.storeName.property can be set to an integer.  The call to idbStore.createIndex(index, index, storeConfig[index]); (About line 115) fails because the third parameter must be an object.


Thanks
Jeff

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: dstore with IndexedDB

dylanks
Hi Jeff,

The first issue sounds like a bug in our implementation. Want to open an
issue?

The second as well sounds like either a documentation issue or bug,
either way, should probably open an issue on that as well and we'll take
a look.

Regards,
-Dylan

on 5/25/16, 14:29 (GMT-07:00) Jeff Utton said the following:

> I'm trying to use the indexedDB backed dstore and running into a few
> issues some of which I've been able to work around some of them.
>
> My object model has an idProperty of "Id" (don't ask, not my choice).
> But dstore is hard coding the keyPath to "id" unless the store config
> has a property idProperty:'<some name>'.  However setting this value in
> the dbConfig causes an exception on line 115 when it tries to create an
> index for "idProperty".
>
> Anyone have any suggestions for a workaround for a custom idProperty
> short of modifying the code?
>
> Another documentation issue with indexedDB, the docs say the the
> dbconfig.storeName.property can be set to an integer.  The call to
> idbStore.createIndex(index, index, storeConfig[index]); (About line 115)
> fails because the third parameter must be an object.
>
>
> Thanks
> Jeff
>
--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Co-Founder, Dojo Toolkit
CEO, SitePen, Inc.  http://www.sitepen.com/
Loading...