Skip to content

Commit bac6b64

Browse files
committed
fix(SQLServerGrammar): Fix for using returning in an upsert clause
1 parent f6d65fe commit bac6b64

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

models/Grammars/SqlServerGrammar.cfc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -513,11 +513,11 @@ component extends="qb.models.Grammars.BaseGrammar" singleton accessors="true" {
513513
var returningColumns = arguments.qb
514514
.getReturning()
515515
.map( function( column ) {
516-
if ( getUtils().isExpression( column ) ) {
516+
if ( column.type == "raw" ) {
517517
return trim( column.getSQL() );
518518
}
519-
if ( listLen( column, "." ) > 1 ) {
520-
return column;
519+
if ( listLen( column.value, "." ) > 1 ) {
520+
return column.value;
521521
}
522522
return "INSERTED." & wrapColumn( column );
523523
} )

0 commit comments

Comments
 (0)