erik konijnenburg created issue - 25/Jan/12 9:19 AM
When a HQL query contain a condition that is mapped to a boolean value the generate SQL query is incorrect. For example
"from Account where locked = true" is translated into "select ....... from Acount where locked=1". When using access it should be "..... where locked=-1". It only fails with with the ASTQueryTranslatorFactory. The ClassicQueryTranslatorFactory works as expected.
Fix is trivial. Add override for ToBooleanValueString to JetDialect that creates the correct values for the SQL statement.
/// <summary> The SQL literal value to which this database maps boolean values. </summary>
/// <param name="value">The boolean value </param>
/// <returns> The appropriate SQL literal. </returns>
public override string ToBooleanValueString(bool value)
{
return value ? "-1" : "0";
}
erik konijnenburg created issue - 25/Jan/12 9:19 AM