<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Create entity based on another entity in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/create-entity-based-on-another-entity/qaa-p/12721417#M4774027</link>
    <description>&lt;P&gt;Thanks alot. Trying it out right away. &lt;/P&gt;</description>
    <pubDate>Sun, 26 Mar 2023 17:13:38 GMT</pubDate>
    <dc:creator>dpk_bhat76</dc:creator>
    <dc:date>2023-03-26T17:13:38Z</dc:date>
    <item>
      <title>Create entity based on another entity</title>
      <link>https://community.sap.com/t5/technology-q-a/create-entity-based-on-another-entity/qaq-p/12721413</link>
      <description>&lt;P&gt;Hello CAP experts! &lt;/P&gt;
  &lt;P&gt;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 ? &lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2023 17:09:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/create-entity-based-on-another-entity/qaq-p/12721413</guid>
      <dc:creator>dpk_bhat76</dc:creator>
      <dc:date>2023-03-24T17:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: Create entity based on another entity</title>
      <link>https://community.sap.com/t5/technology-q-a/create-entity-based-on-another-entity/qaa-p/12721414#M4774024</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I think it depends a lot on the "lifetime" of the entities.&lt;BR /&gt;Referring to you description I would assume you entities have different lifetime and exist an its own.&lt;/P&gt;&lt;P&gt;So they can be changed/delete without effecting the other entity? And both entities should not know eachother?&lt;/P&gt;&lt;P&gt;The only thing is, when create entity A, B should be also created and wen creation B, A should be created?&lt;BR /&gt;And you only want to copy the same data to the other entity?&lt;/P&gt;&lt;P&gt;I this is this case I just would create/insert the other entity when one is created.&lt;BR /&gt;As you said they share most attributes.&lt;/P&gt;&lt;P&gt;I hope this helps, regards&lt;BR /&gt;Norbert&lt;/P&gt;</description>
      <pubDate>Sun, 26 Mar 2023 07:44:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/create-entity-based-on-another-entity/qaa-p/12721414#M4774024</guid>
      <dc:creator>norbert_laenger2</dc:creator>
      <dc:date>2023-03-26T07:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: Create entity based on another entity</title>
      <link>https://community.sap.com/t5/technology-q-a/create-entity-based-on-another-entity/qaa-p/12721415#M4774025</link>
      <description>&lt;P&gt;Hi Norbert!&lt;/P&gt;&lt;P&gt;Thanks a lot for the response. &lt;/P&gt;&lt;P&gt;Let me put some more context:&lt;/P&gt;&lt;P&gt;Entity A and B have totally different lifetimes&lt;/P&gt;&lt;P&gt;We already have a DB with Entity A with around 17 fields. &lt;/P&gt;&lt;P&gt;Now we have a new requirement for entity B. &lt;/P&gt;&lt;P&gt;B needs 4 extra attributes other than that of A.&lt;/P&gt;&lt;P&gt;7 attributes of A are irrelevant for B. &lt;/P&gt;&lt;P&gt;10 attributes are common among A and B. &lt;/P&gt;&lt;P&gt;So I was thinking if I can create an entity C, with only common attributes. And if possible, some how inherit C and create A and B?&lt;/P&gt;</description>
      <pubDate>Sun, 26 Mar 2023 08:04:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/create-entity-based-on-another-entity/qaa-p/12721415#M4774025</guid>
      <dc:creator>dpk_bhat76</dc:creator>
      <dc:date>2023-03-26T08:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: Create entity based on another entity</title>
      <link>https://community.sap.com/t5/technology-q-a/create-entity-based-on-another-entity/qaa-p/12721416#M4774026</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;sounds to me like the 7 attributes that are shared between the A and B should be an named aspect...&lt;BR /&gt;This should look like this: &lt;A href="https://cap.cloud.sap/docs/guides/domain-models#using-predefined-named-aspects"&gt;capire - Domain Modeling with CDS (cloud.sap)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The attributes bouth entities need would be a named aspect an both entities A and B using this context.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;regards&lt;BR /&gt;Norbert&lt;/P&gt;</description>
      <pubDate>Sun, 26 Mar 2023 12:32:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/create-entity-based-on-another-entity/qaa-p/12721416#M4774026</guid>
      <dc:creator>norbert_laenger2</dc:creator>
      <dc:date>2023-03-26T12:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: Create entity based on another entity</title>
      <link>https://community.sap.com/t5/technology-q-a/create-entity-based-on-another-entity/qaa-p/12721417#M4774027</link>
      <description>&lt;P&gt;Thanks alot. Trying it out right away. &lt;/P&gt;</description>
      <pubDate>Sun, 26 Mar 2023 17:13:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/create-entity-based-on-another-entity/qaa-p/12721417#M4774027</guid>
      <dc:creator>dpk_bhat76</dc:creator>
      <dc:date>2023-03-26T17:13:38Z</dc:date>
    </item>
  </channel>
</rss>

