on 03-23-2021 2:32 PM
I am referring to URL:
https://cap.cloud.sap/docs/java/fiori-drafts
Please get back to me on the following feedback:
Hi experts,
We are using the Node.js CDS library for our application. We have the following Sample entities,
Draft-enabled Books entity
namespace sap.bookshop;
using {
cuid,
managed
} from '@sap/cds/common';
entity Books : cuid, managed {
name : String;
releaseDate : Timestamp;
description : String;
}
annotate Books with @odata.draft.enabled;
index.cds for OData (For demo purpose)
using {sap.bookshop.Books}'../books';
service BookService @(path: '/bookstore') {
entity PublishedBooks as select from Books {
releaseDate,
count (
ID
) as numberOfBooks : Integer
}
group by
releaseDate;
}
we are getting the following error when we try to GET data from PublishedBooks entity,
http://localhost:8181/browse/PublishedBooks
error: [.@sap/cds-runtime/lib/cds-services/adapter/odata-v4/okra/odata-commons/logging/LoggerFacade.js] [2021-03-23T14:03:10.570Z | ERROR | 1058866]: { [Error: SQLITE_ERROR: no such column: active.undefined] errno: 1, code: 'SQLITE_ERROR', query: 'SELECT active.releaseDate, active.numberOfBooks, true AS "IsActiveEntity", false AS "HasActiveEntity", null AS "DraftAdministrativeData_DraftUUID", CASE WHEN DRAFTS.DRAFTADMINISTRATIVEDATA_DRAFTUUID IS NOT NULL THEN TRUE ELSE FALSE END AS "HasDraftEntity" FROM BookService_PublishedBooks active LEFT JOIN BookService_PublishedBooks_drafts drafts ON active.undefined = drafts.undefined LIMIT 1000' }
It also gives same error when we use the HANA database.
dependency versions we are using are as below,
@sap/cds: 4.6.4
@sap/cds-runtime: 2.9.6
Hi david.kunz2 ,
I have tried to put the annotation in front of the service-projection-entity:
service frontendService @(path: '/frontend') {
@odata.draft.enabled
entity Names as projection on test.MyFrontendData excluding { ID };
}
But I still get the error described above when I try to call the service without fiori-frontend.
André
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
8 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.