According to the docs it is possible to access the entityId/entityKeyName like this:
import { EntityId } from 'redis-om'
Then you can access the entity ID using that symbol:
album = await albumRepository.save(album)
album[EntityId] // '01FJYWEYRHYFT8YTEGQBABJ43J'
i tried this, but getting the following error in the IDE (webstorm):
TS2538: Type unique symbol cannot be used as an index type.
Despite the error in the IDE, at runtime it successfully produces the entity ID. I could either ignore the wiggly red underline or suppress the error (@ts-ignore and eslint) so i guess it is fine, but just wanted to confirm this is expected behavior?
thank you!