I am starting a new loopback project with a postgresql backend. I know that I will need to embed JSON objects into records and plan to use the native JSON and JSONB column types available in postgres. I noticed in the online docs that there is no reference to these 2 column types (here: http://docs.strongloop.com/display/public/LB/PostgreSQL+connector).
Is it possible to create to use the column types? if so, how would I do that?
thanks, Mark
I'm curious and haven't tried this. Have you tried using an Object type with the json postgres data type?
"properties": {
"dataProp": {
"type": "Object",
"required": false,
"precision": null,
"scale": null,
"postgresql": {
"columnName": "dataProp",
"dataType": "json"
}
}
}
It seems to be supported here: https://github.com/strongloop/loopback-connector-postgresql/blob/79d4fa03bb0922301a22e5d2a85444eadd621ab0/lib/postgresql.js#L480
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With