Choosing an alternate/custom EntityId
field (or at the very least, exposing it by default).
#194
Labels
enhancement
New feature or request
So, I've seen the following two posts concerning
EntityId
customization:https://github.com/redis/redis-om-node/issues/186
https://github.com/redis/redis-om-node/issues/40
However, I'm actually interested in selecting the field-name to which the value gets assigned, and revealing it (via
toJSON()
, or whatever else) for use with CRUD/REST functionality . As it stands, I currently destructure ({...myObj, id: myObj[EntityId]}
) or use some version ofReflect.ownKeys(myObj)
every time I need it. Would be nice to just have it "built-in" and available when the object is CRUDed.I'm almost certain I'm missing something obvious in the documentation. 🤔
The text was updated successfully, but these errors were encountered: