This is syntactically correct, but according to TS, this option is not supported:
@t.Unique("user-hash-device", ["hash", "userId", "deviceId"], {background: true})
@t.Entity('vibe_trace') /// ^^^^^^
export class Trace {
// ...
}
(the above is not quite right, since it doesn't accept {background: true}
there).
- is there a way to set a unique compound index to the background with mongodb?
- if so, how to declare that with TypeORM?