Closed ASiwon closed 1 year ago
Note that I won't port it to mORMot 2 because it is very specific, and handles your workcase as you expect, but is likely to fail in a more general usecase, e.g. when fields are renamed.
Ok. But it will be possible to support similar conditions in mORMot 2? Null values occurs very often in the Oracle database - empty string is always treated as null, which makes that conditions must be created in specific way to take into account the specificity of the database system.
Parenthesis are currently not supported for the custom storage engine. Use direct SQL execution for such complex statements, not the ORM.
… class while parsing SQL with complex condition like:
select field from table where id=? and (column1<>? or column1 is null)
Before correction this query is not correctly parsed in the class TSynTableStatement - closing parenthesis is missing. This causes SQL execution error in my case in Oracle, but probably also in any other database engines.