Search code examples
stringmetadataodata

OData String Maxvalue, how long can it be?


I´m getting the following metadata from OData:

<Property Name="CustomerDesc" Type="Edm.String" MaxLength="Max" FixedLength="false" Unicode="true"/>

I could not find any specification about how long: MaxLength="Max" can be. Is there any limitation?

Thank you.


Solution

  • From the OData V4 spec(preview and not the current version),

    6.2.2 Attribute MaxLength A binary, stream or string property MAY define a positive integer value for the MaxLength facet attribute. The value of this attribute specifies the maximum length of the value of the property on a type instance. Instead of an integer value the constant max MAY be specified as a shorthand for the maximum length supported by the server. If no value is specified, the property has unspecified length.

    So, it is up to the server implementation to assign a value for max.