In this episode we work on the implementation of the handler for our 'on' event, and dig in to some CQL. Everyone welcome, especially beginners, come and join us for friendly chat and curiosity-driven learning-by-doing!
Hello DJ,
Thank you for introducing the CDS REPL in this episode. I spent some time playing with it and wanted to share my experience (rather silly mistake 😉 ). I am using the 'Reflected Definitions' pattern i.e. to use entity definitions reflected from a service model to construct queries.
Assuming it as just a normal constant, I was using "const { lvBooks } = cds.entities('bookshop')", and then my SELECT was always failing.
It took me quite some time to realize that the "variable" name defined using the 'const' keyword is not just any name, instead it should be the actual name of an "entity" that is exposed in the service; i.e. entity Books of the bookshop service. Maybe I missed this point during the session, but as you say "errors are our friends" 🙂
Thanks again for this wonderful series.