Open iseki-masaya opened 8 years ago
Hi,
I'm also bothered by this issue,
@iseki-masaya : a simple way to avoid this problem is to switch the order of youre indexes definition. By declaring the composite index in last, the bug is not trigered.
@yathit : I might submit a PR about this bug, the fix seems to bo simple but i'm not sure about this. In ydn.db.schema.Store you use name.indexOf(otherName) >= 0
to match index name. By doing this first
and last
match first, last
and that's what is triggering the bug.
Since I don't understand why you use indexOf
instead of =
I'm not sure about what is going to break if I fix it this way..
@mehdirande As far I remember, WebSQL has problem with reflection on composite index.
Where is name.indexOf(otherName) >= 0
? If you submit PR, I will see.
Okay done, thanks!
Hi,
I run the below code at Google Chrome(v48) and Safari(v9) on MacOSX(v10.11).
This script works correctly for the first time. However, I got the below error(Chrome) from the second time.
There are no error using IndexedDB however we need to support iOS and Android. Is there way to avoid duplicate index definition?
Thanks