querybuilder
querybuilder copied to clipboard
SqliteCompiler - Issue when using Unique Identifier
The query generated by SqliteCompiler for a table with UUID, the parameters are treated as string.
But the sqlite db stores UUID as blob so the strings needs to be passed as X'3E9FDFCAFF7B3B4AB2065C63BC4609C4'
instead of '3E9FDFCAFF7B3B4AB2065C63BC4609C4'
.
SqliteCompiler doesn't appends X and the query returns with no result.
This further creates problems when using Include or IncludeMany. If the primary and foreign keys are UniqueIdentifier the Include function does not works.
https://stackoverflow.com/questions/7815587/using-guid-in-sqlite-select-where-guid-is-stored-in-the-sqlite-db-as-binaries