redis / redis-om-node

Object mapping, and more, for Redis and Node.js. Written in TypeScript.
MIT License
1.17k stars 78 forks source link

Integer id silently inserts an empty record without raising an error #231

Open palerdot opened 7 months ago

palerdot commented 7 months ago

Issue

When we provide our own integer id to the repository for saving, it silently inserts an empty record with a generated ULID.

For example, providing an integer id like 1

album = await albumRepository.save(1, album)

will insert an empty record {} with a generated ULID album:01FJYWEYRHYFT8YTEGQBABJ43J - {}.

Expected Behaviour

The library should raise an error saying String expected for id or can implicitly convert the integer to string.