Closed nicholas-peterson closed 5 months ago
The most simple fix I can think of would be to set table_declarations
to false
in the toml config.
Then you could manually create them:
let personTable = table<dbo.person>
Or just use table<dbo.person>
inline in your queries.
Nice, thanks for the answer!
I've noticed an issue when a table has a column name with the same name as a table.
This happens if the column name overlaps any table, including the table it's on. For instance, the following schema:
This results in HydraQuery failing to build when using update/insertTask:
dotnet build output:
Changing the definition for the table in the DML to the following fixes the issue:
While this is straightforward to design around (just don't name columns the same as a table), it leads to a somewhat mysterious error (the message makes it sound like you've formatted the fsharp record wrong). Plus, in sql design, foreign keys to other tables often just use the table name for the column, so I think people will hit this somewhat often.