0

I'm using the official page example from Table.where() documentation page:

db.friends.where({name: "David", age: 43}).first(friend => {
    console.log("Found David, 43: " + JSON.stringify(friend));
}).catch(error => {
    console.error(error.stack || error);
});

It simply doesn't work. It can't find the "first" method.

It returns a WhereClause.

it should return a Collection.

slayernoah
  • 4,382
  • 11
  • 42
  • 73
Higarian
  • 533
  • 5
  • 11

1 Answers1

1

It applies to version 2.x only. Documentation mentions that but only in a comment. I updated the docs now to be more clear.

I can recommend to start using dexie@^2.0.0-beta.10 as it has been out for a while.

npm i dexie@next  --save
David Fahlander
  • 5,058
  • 1
  • 20
  • 19