Search
Star
Feedback
Setup for Free
ยฉ 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Create a ressource with multiple relationships - Ash Framework
AF
Ash Framework
โข
9mo ago
โข
6 replies
Quentin
Create a ressource with multiple relationships
The docs specifiy how to create a post
-
> comments relationship
(so in the same direction as the
has_many
has_many
relationship
But I couldn
't find how to create a ressource that has multiple
belongs_to
belongs_to
With the post
-
> comments example
,
How would you create a comment that has more that one required relationship
?
Example
:
comment
_created
_by
-
> User
comment
_post
-
> Post
comment
_category
(
?
)
-
> CommentCategory
Solution
And write the ids
. Or you can use the
argument
argument
+
manage_relationship
manage_relationship
pattern which you can see in the relationships guide
Jump to solution
Ash Framework
Join
The Elixir backend framework for unparalleled productivity. Declarative tools that let you stop wasting time. Use with Phoenix LiveView or build APIs in minutes for your front-end of choice.
2,193
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Load relationships on inserted ressource
AF
Ash Framework / support
3y ago
Multiple Relationships with single attribute.
AF
Ash Framework / support
4y ago
AshGraphql Manage Relationships with multiple actions
AF
Ash Framework / support
3y ago
Seeding multiple resources with inter-relationships
AF
Ash Framework / support
4y ago