You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@olingo.apache.org by Vincenzo Turco <vi...@gmail.com> on 2015/02/18 18:13:41 UTC

relax metadata check on payload contents

Hi all,
I'm using Olingo v2 Java client.
I have some payload that is violating a simple length requirement for a
field:

org.apache.olingo.odata2.api.edm.EdmSimpleTypeException: The metadata
constraints '[Nullable=false, MaxLength=16]' do not match the literal
'VHSLSDPOCI_DPO_00'.|

As a temporary solution, I'd really like to get a workaround to relax
validation.
Are you aware of any way to do so?

thanks a lot, regards
Vincenzo

-- 


Vincenzo Turco

Re: relax metadata check on payload contents

Posted by "Bolz, Michael" <mi...@sap.com>.
Hi Vincenzo,

for serialization (e.g. EntityProvider.writeEntry(…) ) actual exists no option to omit facet validation (e.g. MaxLength).
For de-serialization (e.g. EntityProvider.readEntry(…) ) you could omit facet validation with setting of “EntityProviderReadProperties.isValidatingFacets(false)” (of the “properties” parameter).

Kind regards,
Michael 

> On 18 Feb 2015, at 18:13, Vincenzo Turco <vi...@gmail.com> wrote:
> 
> Hi all,
> I'm using Olingo v2 Java client.
> I have some payload that is violating a simple length requirement for a field:
> 
> org.apache.olingo.odata2.api.edm.EdmSimpleTypeException: The metadata constraints '[Nullable=false, MaxLength=16]' do not match the literal 'VHSLSDPOCI_DPO_00'.|
> 
> As a temporary solution, I'd really like to get a workaround to relax validation.
> Are you aware of any way to do so?
> 
> thanks a lot, regards
> Vincenzo
> 
> -- 
> 
> 
> Vincenzo Turco