lodata icon indicating copy to clipboard operation
lodata copied to clipboard

Problem with any request inside filter

Open flibidi67 opened this issue 2 years ago • 0 comments

Hi,

I'm using lodata with the Lumen framework. I write a ServiceProvider to make it work. I'm currently facing an issue with the any filter inside a filter request : "$filter=keywords/any(s:contains("keyword"))" the error message is this : "Encountered an invalid symbol at: keywords>/<".

I'm using lodata with a MongoDB database and I declared most of the properties manually :


        $entityType = new MongoEntityType('model');
        $entityType->addDeclaredProperty('keywords', Type::collection(Type::string()))
        $entitySet = new MongoEntitySet('Models', $entityType);

        $entitySet->setCollection($this->client->database->models);
        Lodata::add($entitySet);

When I try the same filter request on the odata tutorial page it works : https://services.odata.org/V4/(S(f20bmvx1k4rnprkaym3bgasq))/TripPinServiceRW/People?$filter=Emails/any(s:contains(s,%20%27Scott%27))

Did I make something wrong ? Thanks, flibidi

flibidi67 avatar Dec 20 '23 14:12 flibidi67