不要怂,就是干,撸起袖子干!

You need to sign in or sign up before continuing.
Commit 8108099e by Mick Hansen

fix(ARRAY): fix regression with ARRAY and initialized data types. fixes #3106

1 parent e0352972
# Next
- [BUG] Fixed regression with `DataTypes.ARRAY(DataTypes.STRING(length))` #3106
# 2.0.1 # 2.0.1
- [BUG] Fixed issue with empty `include.where` - [BUG] Fixed issue with empty `include.where`
- [BUG] Fixed issue with otherKey generation for self-association N:M - [BUG] Fixed issue with otherKey generation for self-association N:M
......
...@@ -447,7 +447,7 @@ ENUM.prototype.key = ENUM.key = 'ENUM'; ...@@ -447,7 +447,7 @@ ENUM.prototype.key = ENUM.key = 'ENUM';
* @property ARRAY * @property ARRAY
*/ */
var ARRAY = function(type) { var ARRAY = function(type) {
var options = typeof type === "object" && type || { var options = typeof type === "object" && !(type instanceof ABSTRACT) && type || {
type: type type: type
}; };
if (!(this instanceof ARRAY)) return new ARRAY(options); if (!(this instanceof ARRAY)) return new ARRAY(options);
......
...@@ -281,5 +281,17 @@ suite(Support.getTestDialectTeaser('SQL'), function() { ...@@ -281,5 +281,17 @@ suite(Support.getTestDialectTeaser('SQL'), function() {
postgres: 'BYTEA' postgres: 'BYTEA'
}); });
}); });
if (current.dialect.supports.ARRAY) {
suite('ARRAY', function () {
testsql("ARRAY(VARCHAR)", DataTypes.ARRAY(DataTypes.STRING), {
postgres: 'VARCHAR(255)[]'
});
testsql("ARRAY(VARCHAR(100))", DataTypes.ARRAY(DataTypes.STRING(100)), {
postgres: 'VARCHAR(100)[]'
});
});
}
}); });
}); });
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!