-
[UPDATE] allow for untyped ordering query for nested associations. Will add typing in the next patch
-
Previous versions were skipped due to accidental publishing
- [UPDATE] allow for database raw query
- [FIX] compile cols with
compileRight()
in group bys and fns
- [UPDATE] return more specific types from queryables
- [UPDATE] add groupBy
- [UPDATE] update to modelsafe 2
- [FIX] account for includes in
count()
- [FIX] stop
compileWheres()
from breaking dates
- [FIX] don't put all attribute errors into the
$constraint
group
- [FIX] when merging queries, don't set existing query onto new one by default. leads to duplicate rules
- [FIX] when merging queries, don't assume option params are always set
- [FEATURE] coerce constraint validations also (put into errors.$constraints)
- [FIX] remove typedoc due to security issue
- [FIX] don't
associate()
if no includes are pass at all
- [FIX] make the validator happier when associating in create()
- [FIX] pick() exact include sub-query attrs to avoid a sequelize bug
- [FIX] use nodejs version of cloner
- [FIX] import cloner file into repo, since it's causing a package issue i don't want to work out"
- [FIX] switch an extend to use new cloner
- [FIX] use a cloner that can handle symbol keys when merging wheres
- [FIX] set
as
ingetAssociation
so all assocs get it
- [FIX] allow target assoc to be set on an assoc for cases where the target name is different to the default
- [FIX] compile attributes so they aren't ambiguous
- [FIX] merge duplicate includes properly
- [FIX] explicitly save new assocs regardless of associatedOnly option
- [FIX] calculate include depth and use for de/serialisation, to prevent circ deps from causing issues
- [CHANGE] set associateOnly to true by default as this is the expected behaviour
- [CHANGE] upgrade sequelize and fix new typing issues
- [FEATURE] add
Query.merge
to allow two queries to be merged - [FEATURE] store rich includes to allow for recursively mergable includes
- [FEATURE] add
associateOnly
as include option that doesn't save the data on included associations, just sets the association - [FIX] use transaction in all sequelize calls in
update()
- [FIX] coerce
associate
save errors into aValidationError
and prefix the property keys with the assoc key
- [FIX] when associating belongs-tos in update, check original data for direct id attr, not data from db
- [FIX] map sequelize errors into new modelsafe validation error format
- [FIX] account for target model when determining duplicate foreign keys
- [FIX] pass a default foreign key to sequelize for has-one associations. otherwise it does the wrong thing
- [FIX] reject models that have duplicate has-one foreign keys
- [FEATURE] tests
- [FIX] when de/serialising instances, use an infinite depth (or near enough) so associations aren't wiped
- [CHANGE] Add custom
ThroughOptions
to support defining a through as non-unique
- [FIX] Resolve coerced Sequelizes instances not being saveable without a primary key
- [FIX] allow validation to succeed if all errors are filtered out for required default value attrs
- [FIX] Resolve bug with default-value require validation exclusion
- [FIX] Resolve bug with auto-increment require validation exclusion
- [CHANGE] Upgrade to TypeScript 2.3
- [CHANGE] Require ModelSafe 1.0.0-alpha.8
- [FIX] ModelSafe required attribute validations are now correctly ignored for auto-ncrement fields
- [FIX]
findOne
andfindById
should only deserialize if they succeeded, to prevent a null dereference
- [FIX] 'through' models should be lazy to avoid null-class references
- [CHANGE] Moved to ModelSafe alpha 1.0.0-alpha.1
- [CHANGE] Sequelize models are now correctly serialized to regular ModelSafe model class instances. The ModelSafe models were originally only being used as types and not as proper classes, which means that helper methods and getters/setters defined were not available. This is quite a big change and may break existing code.
- [CHANGE] The
drop
method of queries has been renamed toskip
in order to avoid confusion with the databasedrop
term (for destroying a database table/schema) - [CHANGE] The truncate method of query can now take optional Sequelize truncate options
- [CHANGE]
through
for belongs to many is no longer auto-generated and must be manually defined - [FEATURE] Allow for providing a ModelSafe model as
through
for belongs to many, allowing for more complicated join/through models - [FEATURE] There is now a new
drop
command on queries for dropping database tables
- Added
transaction
param toassociate()
to allow association calls to be transacted - Transacted
associate
andreload
calls increate()
andupdate()
- Added includeAll() for including all associations on a query
- Fixed an include bug that caused shadowing of assoc ids and thus notNull validation errors
- Lost a minor version along the way somewhere
- Bump to ModelSafe
0.7.1
- Improve the error stack generated by coerced validation errors to allow for easier debugging of Sequelize validation errors
- Treat plain attributes passed to
order
as a path, and map the path into a fully-disambiguous model path. Prevents disambiguous attr names, and allows ordering on child attrs - Add
plain
for creatingPlainAttribute
s easily
- Fix include options broken compilation to Sequelize include options
- Fix casing of default
through
setting - Support providing include options in
include
for setting things likerequired
off or manually overriding theas
of a eager-load
- Fix association saving to support setting associations with an include flag even if the association target hasn't come directly from the database (i.e. it's a plain JS object instead of a Sequelize instance)
- Bump to ModelSafe 0.5.2 for
ValidationError
fixes
- Add
findById
operation
- Support ModelSafe's new lazy loading association declaration feature
- Add
save
operation to querying that either updates or creates a model instance automatically based off the primary key of the model
- Re-add
getModelPrimary
asgetInternalModePrimary
to the database class
- Migrate to using ModelSafe for model definitions
- Simplify existing code / improve code quality