You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently testing a service we are developing, was using linqpad and an extension that allows OData v4 client generation wich in turn uses the template and code in this repository.
The service in question has an entity set named "Format" and the proxy generation fails because the T4 template generates the entity set as a property on the proxy container, but the base class already defines a property named "Format", this results in a warning about hiding a field but also an error because it is modified in the constructor of the proxy container.
Assemblies affected
Client code generator from VS Marketplace 7.4.3 (beta)
I'm currently testing a service we are developing, was using linqpad and an extension that allows OData v4 client generation wich in turn uses the template and code in this repository.
The service in question has an entity set named "Format" and the proxy generation fails because the T4 template generates the entity set as a property on the proxy container, but the base class already defines a property named "Format", this results in a warning about hiding a field but also an error because it is modified in the constructor of the proxy container.
Assemblies affected
Client code generator from VS Marketplace 7.4.3 (beta)
Reproduce steps
Run the T4 template with this metadata document
<?xml version="1.0" encoding="utf-8"?><edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"><edmx:DataServices><Schema Namespace="ODataWebApi.Models" xmlns="http://docs.oasis-open.org/odata/ns/edm"><EntityType Name="Poco"><Key><PropertyRef Name="Prop1" /></Key><Property Name="Prop1" Type="Edm.String" Nullable="false" /></EntityType></Schema><Schema Namespace="Default" xmlns="http://docs.oasis-open.org/odata/ns/edm"><EntityContainer Name="Container"><EntitySet Name="Format" EntityType="ODataWebApi.Models.Poco" /></EntityContainer></Schema></edmx:DataServices></edmx:Edmx>
Expected result
A container with an entity set named Format
Actual result
A container with an entity set named Format but does not compile due to errors in the constructor
Additional detail
Change the calls from
this
tobase
fixes the issue (the warnings about hiding an inherited property still remains)https://github.com/OData/odata.net/blob/master/src/CodeGen/ODataT4CodeGenerator.ttinclude#L3196
The text was updated successfully, but these errors were encountered: