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
when working with compound keys, NULL will be used as the value for the keys even though they were given. Executing the given sample project the resulting record in the database will be: NULL, NULL, First, Last, 22. I would have expected that the result would be 1, 2, First, Last, 22.
It seems that the generated insert SQL is ignoring the compound key: /// SQL toINSERTa record into theperson` table.
public static let insert = #"INSERT INTO "person" ( "first_name", "last_name", "age" ) VALUES ( ?, ?, ? )"#
/// SQL to `INSERT` a record into the `person` table.
public static let insertReturning = #"INSERT INTO "person" ( "first_name", "last_name", "age" ) VALUES ( ?, ?, ? ) RETURNING "person_id", "another_id", "first_name", "last_name", "age""#`
While I've prepared everything to support compound keys, I really didn't test those. Quite likely that some things are wrong with those, tbh I didn't expect many people to use them ;-)
Hi,
when working with compound keys, NULL will be used as the value for the keys even though they were given. Executing the given sample project the resulting record in the database will be:
NULL, NULL, First, Last, 22
. I would have expected that the result would be1, 2, First, Last, 22
.It seems that the generated insert SQL is ignoring the compound key:
/// SQL to
INSERTa record into the
person` table.public static let insert = #"INSERT INTO "person" ( "first_name", "last_name", "age" ) VALUES ( ?, ?, ? )"#
Is there a way to work around that?
Thank you!
SQE.zip
The text was updated successfully, but these errors were encountered: