cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

how to define entity without csv data in CAPM Nodejs

manivelmanoharan
Discoverer
0 Likes
1,126

Hello,

I want to create a Entity without using CSV file unlike bookstore cloud samples in github.

Following is the method I tried and ended up with "Error: Artifact “cakeshop.Cakes” has not been found" error BAS application

srv/cat-service.cds

namespace cakeshop;
service CatalogService { entity Cakes as projection on cakeshop.Cakes;}

db/Cakes.cds

namespace cakeshop;
entity Cakes { key id : Integer; name : String; logo : String; desc : String;}

Accepted Solutions (1)

Accepted Solutions (1)

Willem_Pardaens
Product and Topic Expert
Product and Topic Expert

Your service has to refer to the schema file. Add this line to your srv/cat-service.cds:

using cakeshop from '../db/Cakes.cds';

Answers (1)

Answers (1)

junwu
SAP Champion
SAP Champion

csv is never required for creating entity.

manivelmanoharan
Discoverer
0 Likes

Unfortunately, I can't run the app without CSV.

Providing any work samples will be more helpful to me 🙂

junwu
SAP Champion
SAP Champion
0 Likes

you can delete the csv from your current app to see if it is still running