Objection.js: Is it possible to specify the corresponding column name for each property of a model?

Created on 26 Mar 2019  路  3Comments  路  Source: Vincit/objection.js

If not, does this essentially mean our DB model properties have to match code model properties (up to casing)?

Most helpful comment

The documentation website changed. It's now at https://vincit.github.io/objection.js/api/model/static-properties.html#static-columnnamemappers

All 3 comments

Nevermind, I found this: https://vincit.github.io/objection.js/#columnnamemappers

It seems to do what I require.

https://vincit.github.io/objection.js/#columnnamemappers

#columnnamemappers anchor didn't exists ?

The documentation website changed. It's now at https://vincit.github.io/objection.js/api/model/static-properties.html#static-columnnamemappers

Was this page helpful?
0 / 5 - 0 ratings