We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Solving Issues with Fetching User Organizations in Phoenix Framework Using Ecto
69
clicks
Source: reddit.com
Zizizizz wrote their first post seeking assistance with issues in fetching a user's associated organizations using Ecto within the Phoenix Framework. They are using the phx.gen.auth functionality but facing challenges in preloading organizations in the query for the current user session token. Zizizizz provides the schema definitions for User, Organisation, and Membership and describes the various queries they attempted. The initial queries resulted in errors relating to Ecto's requirements for selecting and preloading fields. Zizizizz also shared an update where a modified query provided the desired result but felt incorrect. They are asking for better ways to accomplish this within the Ecto and Phoenix framework.
Related posts
© HashMerge 2024