Closed louis77 closed 8 years ago
According to https://github.com/sailorproject/sailor/blame/master/src/sailor/model.lua#L115 the SQL statement constructed doesn't quote the attribute value if it is a string.
This results in queries like: where canton = AG
where canton = AG
Instead of using Model:find in the HAS_MANY branch the function Model:find_all_by_attributes should be used so the query will be constructed properly.
According to https://github.com/sailorproject/sailor/blame/master/src/sailor/model.lua#L115 the SQL statement constructed doesn't quote the attribute value if it is a string.
This results in queries like:
where canton = AG
Instead of using Model:find in the HAS_MANY branch the function Model:find_all_by_attributes should be used so the query will be constructed properly.