on ‎2023 Mar 24 5:09 PM
Hello CAP experts!
I have a requirement to create 2 entities with many common attributes. So is there any way we can create a parent entity and inherit that to different entities ? Or what is the most optimal way to achieve such requirement ?
Request clarification before answering.
Hi,
sounds to me like the 7 attributes that are shared between the A and B should be an named aspect...
This should look like this: capire - Domain Modeling with CDS (cloud.sap)
The attributes bouth entities need would be a named aspect an both entities A and B using this context.
So both entities share the attributives (on design time and Annotation level) but each entity will have it own lifetime and is saved/change without dependencies.
regards
Norbert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 13 | |
| 8 | |
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.