Added
- Added methods to *Repository* to allow you to provide your own *entityId* instead of relying on a generated one.
- Added support for Redis clustering by passing in a Node Redis connection created with `createCluster`.
- Added better and more meaningful exceptions.
Changed
- *Schema* now supports nested JSON via the `path` option.
- *Schema* now supports specifying the field for a Hash via the `field` option.
- *Schema* now supports `async` functions for *IdStrategy* allowing you to slow down your saves with I/O calls to generate IDs.
- *Repository* now allows adding Entities with properties that are not in the *Schema*. These can even be nested if you are using JSON.
- *Repository* can be now be constructed directly with `new` in addition to being created from a *Client* via `.fetchRepository`.
- *Repository* can now directly be handed an open Node Redis connection. No need to create a *Client* instance.
- *Client* deprecated in favor of using Node Redis connections.
Removed
- *Breaking Change* Removed *Entity* class. While still a type, it's no longer a class and is mostly just an alias for a JavaScript object.
- *Breaking Change* Removed `.execute` method on *Client*. Use Node Redis instead.
- *Breaking Change* Removed `.createEntity` and `.createAndSave` methods on *Repository*. Entities are simply JavaScript objects—to create one just create a JavaScript object and call `.save`.
- As *Entity* is no longer a class, custom methods on an *Entity* are no longer supported.
Fixed
- Corrected parsing where empty arrays were saved to a Hash as an empty String.
- Special characters can now, correctly, be field names