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

Commit b1d48a48 by maximeCony

don't add tableName if not defined

1 parent 82f88ac8
Showing with 10 additions and 4 deletions
......@@ -1709,10 +1709,13 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
})
it('should not fail with an include', function(done) {
var tableName = '"' + this.Project.tableName + '"'
var tableName = ''
if(this.Project.tableName) {
tableName = '"' + this.Project.tableName + '".'
}
this.User.findAll({
where: [
tableName + '."title" = \'republic\' '
tableName + '"title" = \'republic\' '
],
include: [
{model: this.Project}
......@@ -1730,10 +1733,13 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
})
it('should not overwrite a specified deletedAt', function(done) {
var tableName = '"' + this.User.tableName + '"'
var tableName = ''
if(this.User.tableName) {
tableName = '"' + this.User.tableName + '".'
}
this.User.findAll({
where: [
tableName + '."deletedAt" IS NOT NULL '
tableName + '"deletedAt" IS NOT NULL '
],
include: [
{model: this.Project}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!