Sequelize v4.0.0-1 发布了,Sequelize.js 提供对 MySQL,MariaDB,SQLite 和PostgreSQL 数据库的简单访问,通过映射数据库条目到对象,或者对象到数据库条目。简而言之,就是 ORM(Object-Relational-Mapper)。Sequelize.js 完全是使用 JavaScript 编写,适用于 Node.js 的环境。
v4.0.0-1 更新内容:
[CHANGED] Removed
modelManager
parameter fromModel.init()
#6437[FIXED] Made
Model.init()
behave likesequelize.define()
(hooks are called and options have proper defaults) #6437[ADDED]
restartIdentity
option for truncate in postgres #5356[INTERNAL] Migrated to
node-mysql2
for prepared statements #6354[ADDED] SQLCipher support via the SQLite connection manager
[CHANGED] Range type bounds now default to postgres default
[)
(inclusive, exclusive) #5990[ADDED] Support for range operators #5990
[FIXED] Broken transactions in
MySQL
#3568[FIXED]
Model.count
don't include attributes #5057[INTERNALS] Updated
inflection
dependency and pinned version and expose all usedinflection
methods onUtils
[ADDED]
Sequelize.useInflection
method[FIXED]
hasOne
throws error on update with a primary key #6069[FIXED]
Model.count
gives SQL syntax error when usingdistinct
#4840[ADDED]
Model.count
now allow specifying column to count on, useoptions.col
#4442[ADDED]
DEBUG
support #2852[ADDED] Intensive connection logging #851
[FIXED] Only
belongsTo
usesas
to construct foreign key - revert of #5957 introduced in 4.0.0-0[CHANGED]
Sequelize.Promise
is now an independent copy ofbluebird
library #5974[ADDED] before/after Save hook #2702
[ADDED] Remove hooks by reference #6155
[ADDED] before/after Upsert hook #3965
[FIXED] Modifying
options
inbeforeFind
throws error #5675[REMOVED]
classMethods
andinstanceMethods
#5869[CHANGED]
Sequelize.Validator
is now an independent copy ofvalidator
library[FIXED] Don't patch
validator
library globally #6196[CHANGED]
ignore
for create was renamed toignoreDuplicates
#6138[FIXED] Index names not quoted properly in
removeIndex
#5888[FIXED]
Int4
range not properly parsed #5747[FIXED]
upsert
does not fail anymore on not null validations #5711[FIXED] Don't remove includes from count queries and unify findAndCount and count queries. #6123
[FIXED]
Model.count
withoptions.col
andoptions.include
works properly now[FIXED]
bulkCreate
don't map fields to attributes properly #4476#3908#4103#3764#3789#4600[FIXED]
sync
don't handle globaloptions.logging
properly #5788[FIXED]
attribute:[]
throw errors withinclude
orthrough
#5078 #4222 #5958 #5590 #6139#4866 #6242[SECURITY]
GEOMETRY
andGEOGRAPHY
SQL injection attacks #6194[FIXED]
DECIMAL
now supportsUNSIGNED
/ZEROFILL
(MySQL) #2038[FIXED] Generate correct SQL of nested include when quoteIdentifiers is false. (Postgres) #6351
[FIXED] Generate correct SQL for JSON attributes with quote. #6406
[FIXED] Nested query return correct result when quoteIdentifiers is false. (Postgres) #6363
[FIXED] Fixed an issue where changing multiple ENUM columns in PostgreSQL could break. #6203
[FIXED] Add
parent
,original
andsql
properties toUniqueConstraintError
v4.0.0-1 下载:
[FIXED] Add
parent
,original
andsql
properties toUniqueConstraintError
v3.24.1 下载: