Sequelize/tedious table UPDATE on SQL Server 2005 table with triggers fails

为君一笑 提交于 2021-01-29 04:34:38

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!