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

Commit ef40634f by Igor Szymanski Committed by Sushant

test(types): enable string association (#10487)

1 parent b42bbc7a
Showing with 17 additions and 3 deletions
import { Model, Sequelize } from 'sequelize'; import { Model, Sequelize, HasMany } from 'sequelize';
class MyModel extends Model {} class MyModel extends Model {
public static associations: {
relation: HasMany
};
}
class AssociatedModel extends Model {} class AssociatedModel extends Model {}
...@@ -20,5 +24,15 @@ MyModel.findAll({ ...@@ -20,5 +24,15 @@ MyModel.findAll({
}); });
MyModel.findAll({ MyModel.findAll({
include: [{ all: true }], include: [{ all: true }],
});
MyModel.findAll({
include: [{
limit: 1,
association: 'relation',
order: [['id', 'DESC']],
separate: true,
where: { state: Sequelize.col('project.state') },
}]
}); });
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!