You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Select statements that reference associations only seem to be broken. Below SELECT for the standard cap bookshop sample (cds init <my-project> --add data,sample) fails
> await SELECT`books{ID, descr}`.from(Authors).where({ID:101})
Uncaught Error: "descr" not found in the elements of "sap.capire.bookshop.Authors"
If i add a field from the Authors entity, the SELECT works.
> await SELECT`ID,books{ID, descr}`.from(Authors).where({ID:101})
[
{
ID: 101,
books: [
{
ID: 201,
descr: `Wuthering Heights, Emily Brontë's only novel, was published in 1847 under the pseudonym "Ellis Bell". It was written between October 1845 and June 1846. Wuthering Heights and Anne Brontë's Agnes Grey were accepted by publisher Thomas Newby before the success of their sister Charlotte's novel Jane Eyre. After Emily's death, Charlotte edited the manuscript of Wuthering Heights and arranged forthe edited version to be published as a posthumous second editionin 1850.` } ] }]
This looks like a regression in @sap/[email protected], it works with the following versions:
❯ cds --version
…
@sap/cds: 8.5.1
…
>q=SELECT`books{ID, descr}`.from(Authors).where({ID:101})Query{SELECT: {from: {ref: ['sap.capire.bookshop.Authors']},columns: [{ref: ['books'],expand: [{ref: ['ID']},{ref: ['descr']}]}],where: [{ref: ['ID']},'=',{val: 101}]}}>awaitq[{books: [{ID: 201,descr: `Wuthering Heights, Emily Brontë's only novel, was published in 1847 under the pseudonym "Ellis Bell". It was written between October 1845 and June 1846. Wuthering Heights and Anne Brontë's Agnes Grey were accepted by publisher Thomas Newby before the success of their sister Charlotte's novel Jane Eyre. After Emily's death, Charlotte edited the manuscript of Wuthering Heights and arranged for the edited version to be published as a posthumous second edition in 1850.`}]}]
@danjoa this could be related to your recent efforts on cds.ql.
Description of erroneous behaviour
Select statements that reference associations only seem to be broken. Below SELECT for the standard cap bookshop sample (
cds init <my-project> --add data,sample
) failsIf i add a field from the
Authors
entity, the SELECT works.Detailed steps to reproduce
Details about your project
The text was updated successfully, but these errors were encountered: