In our context we are using a custom OData interface on S/4 side which is generated from a CDS view, which again has annotations. The resulting EDMX is of the following structure:
<?xml version="1.0" encoding="UTF-8"?>
<edmx:Edmx xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:sap="http://www.sap.com/Protocols/SAPData" Version="1.0">
<edmx:DataServices m:DataServiceVersion="2.0">
<Schema xmlns="http://schemas.microsoft.com/ado/2008/09/edm" Namespace="vdmerror">
<EntityType Name="TestEntity">
<Key>
<PropertyRef Name="TestEntityID"/>
</Key>
<Property Name="TestEntityID" Nullable="false" Type="Edm.String"/>
<Property Name="SomeField" Type="Edm.String"/>
</EntityType>
<EntityType Name="FieldValues">
<Key>
<PropertyRef Name="FieldValuesID"/>
</Key>
<Property Name="FieldValuesID" Nullable="false" Type="Edm.String"/>
<Property Name="SomeAdditionalProperty" Type="Edm.String"/>
</EntityType>
<EntityContainer Name="default" m:IsDefaultEntityContainer="true">
<EntitySet EntityType="vdmerror.TestEntity" Name="TestEntity" sap:searchable="true"/>
<EntitySet EntityType="vdmerror.FieldValues" Name="FieldValues" sap:searchable="true"/>
</EntityContainer>
<Annotations Target="vdmerror.TestEntity/SomeField" xmlns="http://docs.oasis-open.org/odata/ns/edm">
<Annotation Term="Common.ValueList">
<Record>
<PropertyValue Property="Label" String="Value Help for Field"/>
<PropertyValue Property="CollectionPath" String="FieldValues"/>
<PropertyValue Property="SearchSupported" Bool="true"/>
<PropertyValue Property="Parameters">
<Collection>
<Record Type="Common.ValueListParameterInOut">
<PropertyValue Property="LocalDataProperty" PropertyPath="FieldValuesID"/>
<PropertyValue Property="ValueListProperty" String="FieldValuesID"/>
</Record>
</Collection>
</PropertyValue>
</Record>
</Annotation>
</Annotations>
<atom:link rel="self" href="/api/odata/v2/vdmerror/$metadata" xmlns:atom="http://www.w3.org/2005/Atom" />
<atom:link rel="latest-version" href="/api/odata/v2/vdmerror/$metadata" xmlns:atom="http://www.w3.org/2005/Atom" />
</Schema>
</edmx:DataServices>
</edmx:Edmx>
In SDK versions < 3.6 this worked fine in that also for the ValueEntity entity set a FluentHelper was generated. Afterwards not anymore. Debugging the generation process we found out that the allowed functions which are checked for generating the FluentHelper are identified in the AllowedFunctionsResolver, which has two different sources for the allowed functions: either from the annotations or the sap-attributes on the entity sets.
In our case, the annotations are used because they are present. But unfortunately it keeps the allowed functions in a map were the key is derived from the target attribute in the annotations element (in our case ValueField, see AllowedFunctionsResolver.readOdataSpecFromMetadataFile(...)). Later on in the process however when iterating over the entity sets, the entity name is used as the key for the lookup in the map of allowed functions, where it of course finds no entry and does not generate the FluentHelper interface (s. NamespaceClassGenerator.processEntitySet(...)).
If instead the PropertyValue of the CollectionPath attribute would be used, this would work since it contains the reference to the entity set. So the question is whether the current behaviour is really the intended one?
Our current workaround is to delete the Annotations from the EDMX prior to generation, however this is a bit error prone, although also this could be automated of course.