on 2021 Jun 21 12:18 PM
Hi All,
When I am using @odata.draft.enabled it gives me the below error.
invalid table name: Could not find table/view CATALOGSERVICE_INTERACTIONS_HEADER_DRAFTS in schema MYHANAPROJECT_HDI_MYHANAAPP_DB_DEPLOYER_1
But removing the annotation it gives me the data while calling service.
Have attached below code
using app.interactions as my from '../db/interactions';
@path:'catalog/'
service CatalogService {
@odata.draft.enabled
entity Interactions_Header as select from my.Interactions_Header;
entity Interactions_Items
as projection on my.Interactions_Items;
}
namespace app.interactions;
using { Country } from '@sap/cds/common';
type BusinessKey : String(10);
type SDate : DateTime;
type LText : String(1024);
entity Interactions_Header {
key ID : UUID;
ITEMS : Composition of many Interactions_Items on ITEMS.INTHeader = $self;
PARTNER : BusinessKey;
LOG_DATE : SDate;
BPCOUNTRY : Country;
};
entity Interactions_Items {
key INTHeader : association to Interactions_Header;
key TEXT_ID : BusinessKey;
LANGU : String(2);
LOGTEXT : LText;
};
Request clarification before answering.
Redeployed once again. It worked. thanks @vladislav.leonkev
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
meenakshian0801 It is possible that you have not deployed the db components. You can check the tables in the database, if it is not there (as the error says), try building - cds build - and deploying the db components. Depending on how you've setup your project, it can be deployed from SAP Business Application Studio or by running "npm start" from within the db folder.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 18 | |
| 7 | |
| 6 | |
| 6 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.