Hello,
I'm getting error while modifying entity with a computed property:
SQL logic error or missing database
near "SELECT": syntax error
The problem is SQLite provider generates UPDATE command and then SELECT command without inserting semicolon in between. Here is my case:
UPDATE [transactions]
SET [Order_Status] = @p0
WHERE ([id] = @p1) -- <-- here should be semicolon
SELECT [rec_created]
FROM [transactions]
WHERE last_rows_affected() > 0 AND [id] = @p1
It seems like a bug, doesn't it?
Looking at source code, I'd suggest to apply a fix to DmlSqlGenerator.GenerateUpdateSql method:
...
// where c1 = ..., c2 = ...
commandText.Append("WHERE ");
tree.Predicate.Accept(translator);
commandText.AppendLine(); // <-- change to commandText.AppendLine(";");
// generate returning sql
GenerateReturningSql(commandText, tree, translator, tree.Returning);
...
Thanks,
Denis Pakizh