2025 Apr 17 7:26 AM - edited 2025 Apr 25 12:44 PM
Hi ,I am working on RAP Application where I have Header and Item Entity with association 1 to many.
I tried with different ways, that are managed and unmanaged but i am not able to implement it successfully.
Please Suggest the correct way to handle both header crud and item crud also.
also, if we can implement file upload that can be handle in unmanaged class with looping the entity's (as per my knowledge).
Currently I have Header:
define root view zzhead_view as select from zzhead as _head
association[0..*] to zzitem_view as _item
on $projection.Headerid = _item.Headerid{
key headerid as Headerid,
headername as Headername,
_item
}
Item:
define root view zzitem_view as select from zzitem as _item
association[1..*] to zzhead_view as _head
on $projection.Headerid = _item.headerid
{
key headerid as Headerid,
key itemid as Itemid,
itemname as Itemname,
_head
}
i have developed projection views over the same and also define the behavior definition over header and item separate for interface and projection of both.
define service and expose the projection views in that and binding done over the service, but the actual problem come here,
i am able to create entities for header the create and delete and edit button is there for header but create button is missing for item.
I don't get why, i have implemented unmanaged classes for both.
Item:
Header:
Request clarification before answering.
got your struggle! If you’re avoiding composition, the fix for unmanaged is all about letting the parent handle the child's create, not the child itself. You can’t define create in the item’s behavior. it’ll always throw that "dependent entity" error. Instead, in the header’s behavior, enable create via its association to the item (like association _Items { create; }). For managed, composition automates child CRUD, just define the parent-child as a composition and skip manual logic. Both work, but unmanaged needs manual parent-controlled creation. Check associations and parent behavior setup
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
24 | |
22 | |
8 | |
5 | |
5 | |
4 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.