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
Recently I needed to mess with a table with column names in camel case (eg, fooBar) but I wanted to keep the model fields in snake case (eg, foo_bar) so I looked into passing a param into field, something like this:
foo_bar=Field(str, interface_name="fooBar")
and then just having everything magically work. I think this is possible, but it will take some refactoring. I think I could hook into Interface._normalize_name by having it take a Field instance or a Schema instance. But I would need to change up the interface to always have the Field instance close, then Field.interface_name could be called in that method to return the right name for the db.
The text was updated successfully, but these errors were encountered:
Recently I needed to mess with a table with column names in camel case (eg, fooBar) but I wanted to keep the model fields in snake case (eg, foo_bar) so I looked into passing a param into field, something like this:
and then just having everything magically work. I think this is possible, but it will take some refactoring. I think I could hook into
Interface._normalize_name
by having it take a Field instance or a Schema instance. But I would need to change up the interface to always have the Field instance close, thenField.interface_name
could be called in that method to return the right name for the db.The text was updated successfully, but these errors were encountered: