We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I tried to create a combound key using:
export interface Foo { bar: string, baz: string; } export class MyDexie extends Dexie { foos!: EntityTable<Foo, '&[bar+baz]'>; constructor(name : string) { super(name); this.version(1).stores({ foos: '&[bar+baz]', // Primary key and indexed props }); } }
but I get an error:
Error: Type '"bar+baz"' does not satisfy the constraint 'keyof Foo'. foos!: EntityTable<Foo, '&[bar+baz]'>;
is this a bug or am I missing something?
The text was updated successfully, but these errors were encountered:
EntityTable currently only supports single property primary keys. Try with Table<Foo, [string,string]> instead
Table<Foo, [string,string]>
Sorry, something went wrong.
Thanks, but then I guess I will not have type safety for insertion etc. I guess I'll just use an id, and then create an index to efficiently get it
No branches or pull requests
I tried to create a combound key using:
but I get an error:
is this a bug or am I missing something?
The text was updated successfully, but these errors were encountered: