REST request unknown BufferField
 
Forums / SmartComponent Library - Developer Forum / REST request unknown BufferField

REST request unknown BufferField

2 posts, 0 answered
  1. Bert Strobbe
    Bert Strobbe avatar
    19 posts
    Registered:
    25 Oct 2018
    22 May 2019
    Link to this post
    The FilterString method in RestEntitiesWebHandler tries to translate each field in the querystring to a bufferfield with BufferHelper:FieldWithSerializeName.
    This method returns ? when no match has been found.
    We now allow filtering on fields that are not part of the BE, but are so on DB level. As the method returns ?, this field gets quietly removed from the filter and no filtering occurs.
    Isn't it possible for BufferHelper:FieldWithSerializeName to return the SerializeName parameter back when no match is found in stead of unknown?
    If not, do you see another way to get the extra filter to the backend?
  2. Mike Fechner
    Mike Fechner avatar
    319 posts
    Registered:
    14 Sep 2016
    22 May 2019 in reply to Bert Strobbe
    Link to this post
    Hi Bert, I really don't like the idea of auto-mapping database fields that are not part of the Business Entity for requests from a foreign system. 

    Why not include those fields in the Business Entity and set serialize-hidden to true? That way you keep control over the fields you can filter on.

    If you still need to influence the behavior, you can try to inherit from our web handler and override the FetchDataRequestFromRestRequest method.
2 posts, 0 answered