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 model defined with mapsTo for each property (table is snake_case while model is camelCase). If I use hasOne to associate it to another model, the values of association fields are always null. I have tried the following alternatives:
Defining association field name as it appears in the model. This leads to an exception due to ORM trying to insert a row with camelCase field.
This 2nd approach works in my tests but it broke other unit tests.
Before I continue I would like to know if I'm on the right track here. Are associations defined per model property name (camelCase in my case) or per table column name (snake_case in my case)?
I have a model defined with
mapsTofor each property (table is snake_case while model is camelCase). If I usehasOneto associate it to another model, the values of association fields are always null. I have tried the following alternatives:Utilities.jsfrom:to
This 2nd approach works in my tests but it broke other unit tests.
Before I continue I would like to know if I'm on the right track here. Are associations defined per model property name (camelCase in my case) or per table column name (snake_case in my case)?