Object service giving error after adding new column

I have a object service 'AppUserInfo' with many fields but no relationship with other table. I am getting various error with each operation after adding the new field UserEmail:

1. GET

{
"opstatus": 20005,
"errmsg": "Read operation failed on AppUserInfo",
"httpStatusCode": -1
}

2. POST

{
"opstatus": 20004,
"errmsg": "Create operation failed on AppUserInfo:Unknown column 'UserEmail' in 'field list'",
"httpStatusCode": -1
}

Even though there is a string field UserEmail, it is not recognising. I had published the app containing this object service, but it is still giving same errors. Please guide.

Hi Bibin,

Are you testing from the Foundry App, before or after Publishing ? If you make a change to the Object Data Model, and you did not publish your Foundry app, your updated Data Model will not be used in testing. You have to publish your Foundry App first.

Can you provide the details on how field "UserEmail" is defined in its Data Model? A snapshot of this field definition will help.

If you have published your Foundry App and you are still seeing errors, have you tried executing the Object Service operation in your runtime environment "App Services" (Foundry -> left-hand-navigation -> Environments -> your runtime App Services -> Object Services -> Service Name -> Select Operation) ?

I created the Object service with all the fields but no data and published it. The various operations worked properly i.e. get and post. Later, I added the new field UserEmail of type string, allow null, and published it. After this, the various operations started giving error as mentioned earlier.

To solve this, I had to drop the whole object service and made a new one with different name, and added all the fields. Seems adding new fields after object creation raises such issues.