Melissa Ibeth Vargas Lobo created OLINGO-972:
------------------------------------------------
Summary: 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
Affects Versions: (Java) V4 4.2.0
Reporter: Melissa Ibeth Vargas Lobo
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
(v6.3.4#6332)