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 non-PK uuid field some_other_id that is either set by application logic or otherwise defaults to gen_random_uuid on database level (just like the primary id works too). I observed the following bevahior:
If some_other_id is nil, I receive a not-null error from the database
If I exclude that column through columns = MyModel.column_names - ["some_other_id"] the function seems executed, but then I cannot pass a value (i.e. the non-defaulting case)
With this observation the current behavior seems like a bug to me.
I saw there is an open PR #802 which addresses it: :omit_columns_with_default_functions | true/false|false | Automatically omit columns that have a default function defined in the schema, such as non-PK uuid columns. But I'm not sure if it allows to still pass a value.
Can this issue be fixed?
Thank you!
The text was updated successfully, but these errors were encountered:
I have a non-PK uuid field
some_other_id
that is either set by application logic or otherwise defaults to gen_random_uuid on database level (just like the primary id works too). I observed the following bevahior:some_other_id
isnil
, I receive a not-null error from the databasecolumns = MyModel.column_names - ["some_other_id"]
the function seems executed, but then I cannot pass a value (i.e. the non-defaulting case)With this observation the current behavior seems like a bug to me.
I saw there is an open PR #802 which addresses it:
:omit_columns_with_default_functions |
true/
false|
false| Automatically omit columns that have a default function defined in the schema, such as non-PK uuid columns
. But I'm not sure if it allows to still pass a value.Can this issue be fixed?
Thank you!
The text was updated successfully, but these errors were encountered: