on 03-14-2021 7:01 AM
Hi Folks,
I have two tables Header and Items, both table are as below:-
entity Header: cuid, managed,lockTransaction{
prop1: String(10);
prop2: String(10);
prop3: String(40);
items : Composition of many Items on $self = items.parent;
entity Items: cuid{
parent : Association to Header;
ItemsProp1: String(4);
ItemsProp2: String(40);
ItemsProp3: String(100);
ItemsProp4: String(40);
define view XXReport as
select from Header as h
left outer join Items as i
on h.ID = i.parent_ID
{
key h.prop1,
h.prop2,
h.prop3,
i.ItemsProp1,
i.ItemsProp2,
i.ItemsProp3,
}
order by prop1;
Throwing error that, i.parent_ID property not found.
but same is working on CQL.
let items = await tx.run(
SELECT.from(Items).where({
parent_ID: req.data.ID,
})
);
But this is working.
parent_ID is a property not available during design time. It is created during compilation and finally available in the runtime object (therefore the query you tried works).
In the design time phase you have to use the association name for the on condition like:
view XXReport as
select from Header as h
left outer join Items as i
on h.ID = i.parent.ID
{
key h.prop1,
h.prop2,
h.prop3,
i.ItemsProp1,
i.ItemsProp2,
i.ItemsProp3,
}
order by prop1;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please read my explanation in https://answers.sap.com/answers/13302664/view.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.