[ https://issues.apache.org/jira/browse/OLINGO-972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17882740#comment-17882740 ]
Florent Albert commented on OLINGO-972: --------------------------------------- In Olingo 5, calling functions and actions with direct inheritance (parent -> child) works. However, indirect inheritance (parent -> child -> grandchild) still does not. Trying to call a function or an action from parent type on a grandchild type will fail. > EntityType with Basetype, doesn't inherit a Function of the BaseType. > --------------------------------------------------------------------- > > Key: OLINGO-972 > URL: https://issues.apache.org/jira/browse/OLINGO-972 > Project: Olingo > Issue Type: Bug > Components: odata4-server > Affects Versions: (Java) V4 4.2.0 > Reporter: Melissa Ibeth Vargas Lobo > Priority: Major > Attachments: > 0001-OLINGO-972-EntityType-with-Basetype-doesn-t-inherit-.patch > > > This is my BaseEntity: > <EntityType Name="BaseEntity" Abstract="true"> > <Key> > <PropertyRef Name="ID"/> > </Key> > <Property Name="ID" Type="Edm.Int64"/> > </EntityType> > This entity has the next Function: > <Function Name="GetInvoices" IsBound="true" IsComposable="true"> > <Parameter Name="entity" Type="ns.BaseEntity" Nullable="false"/> > <Parameter Name="param" Type="Edm.String" Nullable="false"/> > <ReturnType Type="Collection(Edm.String)"/> > </Function> > Now, I have an Entity which has a Basetype: > <EntityType Name="Hotel" BaseType="ns.BaseEntity"> > <Property Name="Name" Type="Edm.String"/> > <Property Name="Description" Type="Edm.String"/> > <Property Name="Picture" Type="Edm.String"/> > <Property Name="Location" Type="Edm.String"/> > <Property Name="AvailableStartDate" Type="Edm.DateTimeOffset"/> > <Property Name="AvailableEndDate" Type="Edm.DateTimeOffset"/> > <Property Name="City" Type="ns.City"/> > <NavigationProperty Name="ReviewBooking" Type="ns.ReviewBooking" > Nullable="false"/> > </EntityType> > <EntitySet Name="MyHotels" EntityType="ns.Hotel"> > <NavigationPropertyBinding Path="ReviewBooking" Target="ReviewBooking"/> > </EntitySet> > So, when I try to use the Function GetInvoices: > http://localhost:8080/ODataService/MyHotels(103)/ns.GetInvoices(param='Name') > The response is: > <error xmlns="http://docs.oasis-open.org/odata/ns/metadata"> > <code>null</code> > <message>The part 'ns.GetInvoices' is not defined.</message> > </error> > __________________ > I don't know if it's possible, if the Basetype Entity 'B' has a Function 'F', > another Entity 'A' that has as BaseType 'B' can use the function 'F'. > Thanks. -- This message was sent by Atlassian Jira (v8.20.10#820010)