Bug 16714 - IndexedDB: creating an object store with Array-type key path and key generator should be forbidden
Summary: IndexedDB: creating an object store with Array-type key path and key generato...
Status: VERIFIED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: Indexed Database API (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-12 15:51 UTC by Joshua Bell
Modified: 2012-05-02 19:06 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Bell 2012-04-12 15:51:42 UTC
Per discussion on the list, specifying both a key generator for an object store (via autoIncrement: true) and a key path which is an Array (via keyPath: [...]) would lead to inconsistent keys. This should not be supported.

This spec change should cover it:

OLD: If the optionalParameters parameter is specified, and autoIncrement is set to true, and the keyPath parameter is specified to the empty string, or specified to an Array and one of the items is an empty string, this function must throw a InvalidAccessError exception.

NEW: If the optionalParameters parameter is specified, and autoIncrement is set to true, and the keyPath parameter is specified to the empty string, or specified to an Array, this function must throw a InvalidAccessError exception.
Comment 1 Jonas Sicking 2012-05-02 19:01:46 UTC
http://dvcs.w3.org/hg/IndexedDB/rev/a767a16d315e