fix: 对于in和not in 需要使用quoteIdentifier进行包裹,避免id中的-号被识别为运算符
This commit is contained in:
parent
1d464a38a9
commit
846cccb325
|
|
@ -638,7 +638,7 @@ class SqlTranslator {
|
||||||
filter: filter2[attr]
|
filter: filter2[attr]
|
||||||
}, currentNumber, filterRefAlias, option);
|
}, currentNumber, filterRefAlias, option);
|
||||||
currentNumber = ct2;
|
currentNumber = ct2;
|
||||||
whereText += `(${refAlia2}.id ${predicate} (${stmt}))`;
|
whereText += `(${this.quoteIdentifier(alias)}.${this.quoteIdentifier('id')} ${predicate} (${stmt}))`;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -812,7 +812,7 @@ export abstract class SqlTranslator<ED extends EntityDict & BaseEntityDict> {
|
||||||
}, currentNumber, filterRefAlias, option);
|
}, currentNumber, filterRefAlias, option);
|
||||||
|
|
||||||
currentNumber = ct2;
|
currentNumber = ct2;
|
||||||
whereText += `(${refAlia2}.id ${predicate} (${stmt}))`;
|
whereText += `(${this.quoteIdentifier(alias)}.${this.quoteIdentifier('id')} ${predicate} (${stmt}))`;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue