Closed Caviaros123 closed 10 months ago
Hi @Caviaros123, I have tried to reproduce your issue and confirmed it is a bug. Filtering in relations does not work. Does it make sense for you to use a component? Components are supported.
Just to be clear. Are you trying to filter parkings based on one-to-one relation of address or can the parking have many addresses and you are trying to filter the relations? I assume the first is right but just checking.
I messed with the code a bit and tried to find a quick solution but haven't found one. It will take a longer time. Will get back to it. Until then, I will add an information to readme that filtering by relation is not supported.
Hello my solution was to create a Hook by adding the coords field directly to the parking table without using components and to fill it with the values ​​of another field which uses APi Google places to give me the address and geocode position and have this coordinates field filled in
So your problem is solved, right? Just asking to know whether I can close this issue and make it and make a feature request issue to support relations.
Closing for inactivity and making a feature request out of this.
Bug report
Describe the bug
A clear and concise description of what the bug is.
Steps to reproduce the behavior
Nothing happened when requesting on : http://localhost:1337/api/parkings?populate[address][fields][0]=coords&$location[address][coords]=23,14,3
Expected behavior
I configured everything correctly, it took me a while to migrate my MySQL database to Postgres using the PostGis Docker image but I have no proof that this mechanism works, I always get a 200 response whatever the coordinates I use. enter I don't have the impression that the data is correct but the data from relation address not working
Screenshots
If applicable, add screenshots to help explain your problem.
Code snippets
If applicable, add code samples to help explain your problem.
System
Additional context
plugin-version: "@notum-cz/strapi-plugin-location": "^1.1.4", Add any other context about the problem here.