Skip to content

Releases: dresende/node-orm2

3.1.0

09 May 22:53
@dxg dxg
Compare
Choose a tag to compare

Add enumerable flag to exclude instance properties from enumeration (#724)

3.0.0

03 May 01:54
@dxg dxg
Compare
Choose a tag to compare

Disable identity cache by default & rename from cache to identityCache.

The so called 'cache' wasn't really a cache, and this fact causes many problems.
Closes #350
Closes #564
Closes #626
Closes #672
Closes #684
Closes #694
Closes #721

2.1.30

28 Jan 16:24
Compare
Choose a tag to compare
  • Fix bug for windows path (@dxg)

2.1.26

28 May 09:13
Compare
Choose a tag to compare

Add 'instance.saveAssociationsByDefault' option & bump sql-query

2.1.24

24 Mar 19:47
Compare
Choose a tag to compare
Merge pull request #620 from dresende/join

Bump sql-query version

2.1.2

18 Sep 22:47
Compare
Choose a tag to compare
  • Fixes stack overflow on instance.save() with a reversed hasOne association (#338)
  • Reverts should dev dependency to 1.2.2 (newer version was causing problems)
  • When using postgres you can now use [email protected] (unless when connecting to Heroku - use 2.5.0)

2.1.1

13 Sep 20:48
Compare
Choose a tag to compare
  • Add TypeScript interface
  • Allow custom join tables (#276)
  • Fixes stack overflow when saving auto-fetched model with relations (#279)
  • Unique validator can be scoped and case insensitive (#288)
  • Allow async express middleware (#291)
  • Allow finding by associations (#293)
  • Fix sqlite find with boolean (#292)
  • Fix afterLoad hook error handling (#301)
  • Allow auto-escaping for custom queries (#304)
  • Add support for custom property types (#305)
  • Allow ordering by raw sql - .orderRaw() when chaining (#308, #311)
  • Fix saving Instance.extra fields (#312)
  • Fix NaN handling (#310)
  • Fix incorrect SQL query (#313)
  • Deprecated PARAM_MISSMATCH ErrorCode in favour of correctly spelt PARAM_MISMATCH (#315)
  • Add promises to query chain (#316)
  • Adds a test for hasMany.delAccessor with arguments switched (#320)
  • Allow passing timezone in database connection string, local timezone is now default (#325, #303)
  • Adds ability to call db.load() with multiple files (closes #329)
  • For mysql driver, when using pool, use con.release() instead of con.end() (if defined) (closes #335)
  • Passes error from afterLoad hook to ready event
  • Most errors now have a model property
  • Adds connection.pool and connection.debug settings
  • Fixes throw when calling ChainFind.first() or .last() and it has an error
  • Removes upper limit on VARCHAR column size
  • Allows multi-key models to support hasMany

2.1.0

03 Aug 08:49
Compare
Choose a tag to compare
  • Adds License (MIT) file (closes #271)
  • Make Model.get respect Model autoFetch default value (#277)
  • Changes the way ":" is added to sqlite db paths (#270)
  • Fixes duplicated debug lines for postgres (#258)
  • Fixes not saving associations if no changes (other than associations) are made (#256)
  • Fixes autoFetch being discarded in Model.get options (closes #266)
  • Adds beforeDefine to plugins (#263)
  • Allows user to pass an object to extendsTo.setAccessor instead of an instance (detected via #250)
  • Changes autoFetch to avoid autofetching if instance is not saved (it's new!) (#242)
  • Changes validations and predefined validators to use [email protected]
  • Adds support for setting properties.association_key to be a function (name, field)
  • Passes connection settings to database drivers
  • Creates initial mongodb driver and 'mongo' driver alias
  • Allow querying chainfind with sql conditions
  • Allow passing extra options to extended models
  • Allow big text fields
  • Allow before* hooks to modify the instance
  • Fixes #226 - hasOne delAccessor not working
  • Adds Utilities.getRealPath to look for the real path to load based on the file where it was called from (for db.load and db.use)
  • Fixes Model.aggregate().call() to accept no arguments except function name
  • Fix problem with extendsTo and custom key types
  • Better association typing and multikey support

2.0.15

11 Jul 22:26
Compare
Choose a tag to compare
  • Support for 'point' type as a property (#221)
  • .call() in aggregates for generic functions (#204)
  • Adds hook afterAutoFetch triggered after extending and auto fetching (if any) associations (#219)
  • Adds predefined validator .password()
  • Adds ability to have the afterLoad hook blocking (#219)
  • Changes Model.create() to wait for createInstance callback instead of using the returned value
  • Fixes problem with hasOne associations for none persisted instances and autoFetch active just blocking
  • Refactored Model.hasOne() constructor to be able to mix parameters
  • Fixes reversed hasOne association on the reversed model not being correctly saved (#216)
  • Changes Model.hasMany.addAccessor to throw just like .setAccessor when no associations are passed
  • Adds ability to pass an Array to hasMany.hasAccessor and also not passing any instance to hasAccessor and have it check for any associated item
  • Exposes Model methods to change hooks after model definition
  • Fixes postgres driver not returning numbers for number columns
  • Fixes passing json object instead of instances to Model.create() associations (#216)
  • Passes Model to Instance directly, changes Instance to use Model.properties instead of opts.properties
  • Exposes Model.properties
  • Removes old Property.js throw error in favour of new one
  • Adds initial Model.extendsTo(name, properties[, opts])
  • Avoids redefining properties in instances
  • Adds ErrorCodes.NOT_DEFINED
  • Adds db.drop() - similar to db.sync()
  • Changes hasMany.getAccessor to support order as string (closes #196)
  • Handle django string formatted sqlite datetime
  • Many bug fixes

2.0.14

02 Jul 23:08
Compare
Choose a tag to compare
  • Changes many errors to use the ErrorCodes generator (#206)
  • Changes Model.aggregate() to support multiple orders when calling .order() (#207)
  • Changes Readme.md sqlite3 version and adds warning.
  • Fix wrong import of debug output for aggregate functions
  • Fix orm when running on node v0.6 (at least) and module not found error has no code property
  • Adds model.namePrefix setting (#203)
  • Fixes bug when passing an array (object) of ids but no options object
  • Only mark model as dirty if a property has really changed
  • Fix hasOne infinite loop
  • WIP: Fix hasOne infinite loop & migrate tests to mocha
  • Fixes ipv4 predefined validator match string (it was not matching correctly!)
  • Fixes Model.get() when passing cache: false and model has cache: true
  • Creates Singleton.clear() to clear cache, exports singleton in orm
  • Fix required property model.save only threw a single error with returnAllErrors = true
  • Fixes some hasMany association usage of Association.id to check for real id property name (#197)
  • Changes db.load() to return value from loaded and invoked function (#194)
  • Adds possibility to add a callback to ChainFind.find() (#190)
  • Adds .findByX(...) to .hasOne("X", ...)
  • Allow db.load() to work outside of module.exports
  • Fix mysql driver for non-autoincrement key
  • Test framework moving to mocha, not complete yet
  • Adds make cov to make for a test coverage
  • Many other bug fixes