Ash FrameworkAF
Ash Framework3y ago
4 replies
Jason

Seeding multiple resources with inter-relationships

How do I do something like this in Ash? User and Post are Ash resources where a User has many posts. It doesn't seem to work as it does in Ecto.
Repo.insert! %User{
    name: "John",
    posts: [%Post{
       text: "First post"},
        %Post{
        text: "Second post"}]
}
Was this page helpful?