[Backend] Best practice working with HANA XS on Cloud Platform
Hi,
I will share some best practice that took me hour to figure out what's solution.
Then I come up with idea to add more data & relation so that I can do more with my application. That's when I got error:
Even I add one column to my table, added data using SCV import. The 2 files are saved & activated successfully. But the data didn't returned in the Data service. When I check in the catalog of the service, it look like this (the new column "INSTOCK" does not have data):
I've thought that I cannot modify the structure of table during the database is up & running. So I tried to restart the database but it didn't work.
After a while (hours), I tried to change the order in which I add the new column into my table:
And it worked!
So, the REASON is the order of the new column. It should be inserted at the end of the current table, so that it won't (or at change the least) the table structure.
---V---
I will share some best practice that took me hour to figure out what's solution.
Perquisite:
I follow the tutorial series here, so things are basically set up.1/ Cannot add more column to table
After I completed all the tutorial series, I've got a XS service expose table data as OData service. And I can use the service to bind onto UI in SAPUI5 application.Then I come up with idea to add more data & relation so that I can do more with my application. That's when I got error:
Even I add one column to my table, added data using SCV import. The 2 files are saved & activated successfully. But the data didn't returned in the Data service. When I check in the catalog of the service, it look like this (the new column "INSTOCK" does not have data):
Issue with "INSTOCK" column |
After a while (hours), I tried to change the order in which I add the new column into my table:
And it worked!
So, the REASON is the order of the new column. It should be inserted at the end of the current table, so that it won't (or at change the least) the table structure.
---V---
Nhận xét
Đăng nhận xét