cancel
Showing results for 
Search instead for 
Did you mean: 

BAS learning journey 'Unknown type undefined (com.sap.learning.Price) in ...'

Ppainter
Explorer
0 Kudos
254

Going through the CAP-Development learning journey, on the step of 'Using Databases', at the part where initializing data using the command 'cds add data' and this error occurs.

user: cap-development-learning-journey $ cds add data
Adding feature 'data'...
Unknown type undefined (com.sap.learning.Price) in 'com.sap.learning.Books:price'
Skipping db/data/com.sap.learning-Authors.csv
Skipping db/data/com.sap.learning-Books.csv

Successfully added features to your project.

The csv files are generated, but with no Price columns. Is that correct?

Ppainter
Explorer
0 Kudos
This is the model file: namespace com.sap.learning; type Genre : Integer enum { fiction = 1; non_fiction = 2; } type NoOfBooks : Integer; type Price { amount : Decimal; currency : String(3); } entity Books { key ID : UUID; title : String(255); genre : Genre; publCountry : String(3); stock : NoOfBooks; price : Price; isHardcover : Boolean; } entity Authors { key ID : UUID; name : String(100); dateOfBirth : Date; dateOfDeath : Date; }
Ppainter
Explorer
0 Kudos
and the sql preview: CREATE TABLE com_sap_learning_Books ( ID NVARCHAR(36) NOT NULL, title NVARCHAR(255), genre INTEGER, publCountry NVARCHAR(3), stock INTEGER, price_amount DECIMAL, price_currency NVARCHAR(3), isHardcover BOOLEAN, PRIMARY KEY(ID) ); CREATE TABLE com_sap_learning_Authors ( ID NVARCHAR(36) NOT NULL, name NVARCHAR(100), dateOfBirth DATE_TEXT, dateOfDeath DATE_TEXT, PRIMARY KEY(ID) );
VVancalbergh
Contributor
0 Kudos
This is incorrectly tagged as "SAP Cloud Applications Studio"
View Entire Topic
Ppainter
Explorer
0 Kudos

As a newcomer, thank for the input. What should it be tagged as?