cancel
Showing results for 
Search instead for 
Did you mean: 

CAP Metadata, "Type" attribute on property is missing

SamueleBarzaghi
Participant
0 Kudos

Hi,

View calculated fields are missing of the "Type" attribute in metadata, even if annotated with @odata.Type, look at property copiesSold:

<EntityType Name="BooksTotalSales">
    <Key>
        <PropertyRef Name="book_ID"/>
    </Key>
    <Property Name="book_ID" Type="Edm.Int32" Nullable="false"/>
    <Property Name="title" Type="Edm.String"/>
    <Property Name="copiesSold"/>
</EntityType>

Repo to reproduce:

https://github.com/sbarzaghialteaup/test-type-view-fields

Thanks for support

Ciao

Sam

Accepted Solutions (1)

Accepted Solutions (1)

hjb
Advisor
Advisor
0 Kudos

Thanks for reporting, today a warning is raised if you don't type cast. However, this warning is not presented to the user in all conditions (which is beyond control of the core compiler). Just recently we have raised this warning to an error which will be shipped in one of the next releases.

@odata.Type is not an option, usually it happens when untyped expressions in views are used, such as:

view SomeView as select from SomeEntity { ..., 1+2 as three, ... };

Answers (0)