问题
Using
- tedious 1.14
- sequelize 3.29
- node 6.9.4
Connecting to: SQL Server 2005 on Windows Server 2008 R2 Std
Node console output (attempted DML):
Executing (default): UPDATE [OtifOrders] SET [onTime]=N'Short Lead Time / Add On',[inFull]=N'Product Substitution' OUTPUT INSERTED.* WHERE [orderNumber] = N'1024098924-1'
PATCH /api/otiforders/1024098924-1 500 302.990 ms - -
SQL Server error message from profiler:
The target table OtifOrders of the DML statement cannot have any enabled triggers if the statement contains an OUTPUT clause without INTO clause.
Anyone else ran into this, how did you get around it?
Not 100% sure this is tedious...
Cheers
回答1:
Crap, Why is it always like that - as soon as I post the question to a forum I find the answer and it's right on front of my nose.
Anyway, here it is: https://github.com/sequelize/sequelize/issues/4807 AsientosContables_sql = sequelize.define('AsientosContables_sql', { }, { tableName: 'Asientos', hasTrigger: true });
来源:https://stackoverflow.com/questions/41577879/sequelize-tedious-table-update-on-sql-server-2005-table-with-triggers-fails