can we sort the relationship on basis of updated , basically i have a user collection having relation with imagescollection any waey to get images when calling user collection as imaeg to be sort on basis of updated?
So, you want the image relationship sorted when fetching a user document too? Just trying to understand the usecase. One user can have many images?
hm
but i dont think thats really possible with queries too. fetching a user doc will fetch all the images i think (or max of 25?). What you could do is maybe add a userId attribute to the image collection & fetch those with Query.
possibly also add a doc level permission
yeah i think have to do two fetch user and other images
you can use Query.select and not add the relationship data attribute key to avoid fetching that. A bit quicker and faster to get only the data required. After that fetch the images with your Query for userId and limit & orderDesc
hm! thanks buddy
no worries. pl. mark the issue as [SOLVED] if the issue/question is resolved.
Happy Appwriting :appwritecheers:.
Recommended threads
- Any way to temporarily bypass the email ...
Hey guys, any way to bypass the email verification to use the accounts again? i need to recover some projects that due to recent changes have been stopped, and ...
- Collections list not showing up when try...
I'm trying to create new relationship attribute but both one way and two way relationship is not showing up collections list to connect with my relationship att...
- I have try to use the appwrite in to the...
Invalid Origin. Register your new client (oailedjdbkhlkakmnnapoonllbnfmfij) as a new Web (Chrome Extension) platform on your project console dashboard