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
Postgresql has a function json_set which can be used to update a json data partially. Or it also supports update an array of json type. It would be better to support this function in typeorm.
The Problem
I am not able to update a json field partially. For example, consider below data saved in postgresql table column.
{ firstName: '', lastName:''}
If I only update firstName, it will override lastName with empty string.
The Solution
I have to use raw sql to do json_set in order to make it work.
Considered Alternatives
Additional Context
Relevant Database Driver(s)
aurora-data-api
aurora-data-api-pg
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
sqlite
sqlite-abstract
sqljs
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
Yes, I have the time, and I know how to start.
Yes, I have the time, but I don't know how to start. I would need guidance.
No, I don't have the time, although I believe I could do it if I had the time...
No, I don't have the time and I wouldn't even know how to start.
The text was updated successfully, but these errors were encountered:
Feature Description
Postgresql has a function
json_set
which can be used to update a json data partially. Or it also supports update an array of json type. It would be better to support this function in typeorm.The Problem
I am not able to update a json field partially. For example, consider below data saved in postgresql table column.
If I only update
firstName
, it will override lastName with empty string.The Solution
I have to use raw sql to do
json_set
in order to make it work.Considered Alternatives
Additional Context
Relevant Database Driver(s)
aurora-data-api
aurora-data-api-pg
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
sqlite
sqlite-abstract
sqljs
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
The text was updated successfully, but these errors were encountered: