All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
7.2.1 (2019-09-26)
7.2.0 (2019-09-26)
- Typescript: Improve typings support (43d9dc2)
7.1.0 (2019-09-13)
7.0.0 (2019-09-11)
-
entitykey: The "keyType" Schema option has been removed as it is no longer needed. Also, as gstore does not parse the id anymore, running your project against the Datastore emulator locally might break as the emulator treats differently User.get(123) than User.get("123"). Auto-allocated ids are integers and need to be provided as integers for the Emulator.
-
Dependencies: Node version 8.x not supported anymore. Upgrade to v10.x or superior.
-
Dependencies: The @google-cloud/datastore package is not defined anymore as a dependency of gstore-node. You will need to manually install it in your project.
-
Dependencies: Set google-cloud datastore as peerDependency (#177) (ac52ffb)
- call execPostHooks on internalTransaction (#161) (7b132cf)
- entity: add "id" property to entity after it has been saved (#180) (15a713a), closes #172
- entitykey: remove convertion of string number to integer for entity key id (#179) (75dc869), closes #168
- excludefromindexes: update logic to add all properties of Array embedded entities (#182) (c9da35b), closes #132
- model: throw NOT_FOUND error when trying to update a Model that does not exist (#181) (cc11e02), closes #164
- Types: Schema methods() signature (#171) (4a144ce)
6.0.2 (2019-04-26)
- added default options when Joi is enabled (528da24)
6.0.1 (2019-03-26)
- Typescript: Add missing export types (f91fc39)
6.0.0 (2019-03-07)
- Model.get(): Consistently return an Array when providing an array of ids (#155) (45e68fc), closes #134
- Model.get(): When an Array of ids is provided to Model.get(), gstore will now consistently return an Array. In earlier versions, if an array of one id was provided, gstore would return a single entity instead of an array containing the entity.
5.0.2 (2019-03-07)
- Entity: Allow saving an entity that has been populated (a24c75a)
- model.get(): handle null when entity does not exist (#152) (21d258f)
- Model.update(): fix onUpdateError throwing empty object instead of error (#153) (b1929c7)
5.0.1 (2019-02-05)
5.0.0 (2019-02-04)
- Populate: Fetch entities references in Model.get() and queries (72fff67)
- The new way to create gstore instances is with "new Gstore()". Refer to the documentation.
- Populate: Callback (hell) are not supported anymore as the last argument of gstore methods. Only Promises are returned.
- Populate: Node runtime must be version 8 or superior
- Populate: The old Schema property types "datetime" and "int" have been removed. Date and Number types should be used instead.
4.3.3 (2018-12-29)
4.3.2 (2018-12-21)
- Fixes 'exludeFromRead' for nested paths where object does not exist (f7c336c), closes #128
- excludeFromRead: Make sure segment exist before trying to access it when deserializing (03bcf53)
- Model: Update validate() to not sanitize prop where write is set to false (#138) (e86a875)
4.3.1 (2018-11-13)
- Model: Modify validate() method to update entityData on validation (98dab4b)
- Model: Preserve gstore KEY on entityData when validating Joi Schema (f86dbcb)
4.3.0 (2018-09-07)
- entity: Remove Array wrapping of datastoreEntity() response from cache (00254d0)
- Add global gstore config to return null on entity not found (6b73631), closes #123
- Support "read"-type config for embedded objects (e3e554f), closes #122
4.2.6 (2018-08-26)
- typescript definitions file (e99125e)
- typescript definitions file (399087c)
- cache: Throw error when Model.get() returns undefined from cache (b46758a), closes #119
4.2.5 (2018-08-18)
4.2.4 (2018-07-30)
4.2.3 (2018-07-22)
- delete-hooks: Wrong argument mapping in getScopeForDeleteHooks() (5c91046)
4.2.2 (2018-07-10)
4.2.1 (2018-05-08)
4.2.0 (2018-05-08)
- global-save: Add option to validate entity before saving in gstore.save() method (39ccb9c), closes #103
- gstore-save: Add save method to global save (9908d7c), closes #105
- virtual properties: Access and update virtuals properties directly on the entity instance (b079f7e), closes #102
4.1.1 (2018-04-11)
- typings: Add missing generics to Schema in Model creation (f3cc4b4)
4.1.0 (2018-04-11)
- queries: Allow namespace to be set in "list" queries options (ea5326e)
- queries: Forward options object to Datastore Query (2eb0f3f)
- hooks: Model.delete() "post" hooks callback have now their scope on the entity instance delete (4d9b4dd)
- Schema: Set new types for Schema definition (ad51508)
- Typescript: Add Typescript support (351538b)
4.0.0 (2018-03-19)
- error handling: Set error code when entity not found in entity.datastoreEntity() method (03cfd7b)
- cache: Add cache layer to entity.datastoreEntity() method (63780e4)
- error handling: The error code when the entity is not found has been changed from "404" to the "gstore.errors.code.ERR_ENTITY_NOT_FOUND" code