Comments (7)
Have you ran a cds build
command first? That should create the /gen/ folder and output the csn model.
from cloud-cap-hana-swapi.
I see the model path after cds build but with cds deploy --to hana the /gen/ folder is re-created and csn.json is moved to gen/db/last-dev.
Also, loading the data gives a load of errors of two types:
CompileMessage {
message: 'CSN property ‘on’ can only be used alternatively to ‘keys’',
location: [Object],
'$location': [Object],
validNames: null,
severity: 'Error'
and
CompileMessage {
message: 'CSN property ‘mixin’ is not expected in ‘projection’',
location: [Object],
'$location': [Object],
validNames: null,
severity: 'Error'
from cloud-cap-hana-swapi.
I see the model path after cds build but with cds deploy --to hana the /gen/ folder is re-created and csn.json is moved to gen/db/last-dev.
Interesting - it does that for me now as well. It seems like another cds build is needed after the cds deploy. I'm not sure why the deploy is doing that though. Perhaps a recent change to the way deploy works or a bug. But it does seem like just running another cds build afterwards restores the full /gen folder.
Although I don't receive any of the errors you reported when running the load script. Here is my output when I ran it just now:
Perhaps you can post a screenshot to get a sense of where those errors might be coming from. Also try running cds version
from the same place you run the load script. Maybe you are picking up an older, global install of CDS. Especially the mixin not expected in the projection sounds like maybe an older release. I just tested against the latest available cds version.
from cloud-cap-hana-swapi.
When loaded the data using the restored /gen/ folder (after second build), got no errors.
Still getting the errors if I load with /gen/db/last-dev model.
The two generated csn.json files have some differences.
from cloud-cap-hana-swapi.
Yes, I'm not sure why the srv content within /gen is getting wiped out by the deploy. Seems to be not right to me. But that csn in the /gen/db/last-dev is something different. It's how cds is just keep track of the changes that have been made to any part of the data model that uses persistence journaling/Schema Evolution.
cloud-cap-hana-swapi/cap/db/schema.cds
Line 12 in 96b5e0a
But this isn't the complete model, it's only a partial model used internally within CAP to track changes.
For the data load or any other usage of the CAP APIs you want the full model that should be in the /gen service folder. So, the whole role problem here seems to be that /gen/srv is getting deleted for some reason when the cds deploy runs. But at least there is an easy work around to just run cds build again after a deploy to bring it back.
from cloud-cap-hana-swapi.
Ok, I see. Thanks for explaining.
from cloud-cap-hana-swapi.
I did add two notes to the README.md about this situation and I'll enter an internal ticket to try and see if we can figure out why the /gen/srv
is getting cleared in the first place.
Thanks,
Thomas Jung
from cloud-cap-hana-swapi.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloud-cap-hana-swapi.