You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a table with a primary key that is of type VARCHAR and is referenced by another table, but it looks like Sequoia only supports. At least, when I try to compile I get this:
Error: This expression has type
string Alias.Field.t = (Alias.Field.table, string) Sequoia_field.t
but an expression was expected of type
(Alias.Field.table, int) Sequoia_mysql.M.Field.t =
(Alias.Field.table, int) Sequoia_field.t
Type string is not compatible with type int
Example:
openSequoia_mysqlmoduleURL=structinclude (val table "url")
let id =Field.int"id"(* ... *)endmoduleAlias=structinclude (val table "alias")
let name =Field.string"name"let url =Field.foreign_key "url"~references:URL.id
(* ... *)endmoduleUse=structinclude (val table "use")
let id =Field.int"id"let alias =Field.foreign_key "alias"~references:Alias.name (* <- error *)let url =Field.foreign_key "url"~references:URL.id
(* ... *)end
The text was updated successfully, but these errors were encountered:
This is sort of by design, as I believe non-integer foreign keys are not considered a good practice. I could be convinced otherwise, but one of the goals of Sequoia is to try to enforce good practices.
I have a table with a primary key that is of type
VARCHAR
and is referenced by another table, but it looks like Sequoia only supports. At least, when I try to compile I get this:Example:
The text was updated successfully, but these errors were encountered: