2022 Aug 08 3:21 PM
Hi Team,
We are trying to use localized field as mentioned in below doc
https://cap.cloud.sap/docs/guides/localized-data
As mentioned in doc, we have just created a localized field similar to Books
Actual one is below
entity QuickLinks {
key QUICKLINK_ID : UUID;
quickLink_name : localized String not null;}
And exposed a service which has projection on Quicklinks entity
using {sap.acs.app as acs} from '../../db/';
service QuickLinksService @(requires: 'ESC_ServicePlanner'){
entity quickLink as projection on acs.QuickLinks;
};
Our understanding after reading doc is that we don't have to do anything else if we just want to support POST and GET on this entity.
But when i am trying to do a Post call , data is not inserting in the _Text table for German language .
It always goes in QuickLinks table instead of going to QuickLinks_text table
below is the rest call
### German Create Link
POST http://localhost:8080/api/QuickLinksService/quickLink?&sap-language:de HTTP/1.1
Authorization: Basic admin admin
Content-Type : application/json
Accept-Language: "de
Can you please help us to know if we need to do some custom logic in handlers or if there is something wrong in our understanding
Regards
Rohit
2022 Aug 09 8:06 AM
I analyzed it further.
Seems, insert has to be taken care explicitly. Either through CSV or through persistence service in handlers we need to insert data.
Get is taken care implicitly by CAP.