Closed makeitworks closed 1 year ago
The short answer is that you cant. What you can do instead is just pass in the user id as the entity id and if you rly rly need it you can add some duplication for ease of use (wouldnt recommend) The way to do it however changes depending on the version you are on (stable or beta)
Redis OM 0.4 Beta supports this. Check out the README in the repo for some examples.
such as i have UserScheme:
let UserSchema = new Schema(Entity, { userid: {type:'number'}, name: { type: 'string' } })
the field
userid
is unique , and i want use userid as entityId , how should i do it ?