Thank you @Linuus! I was missing the user: u on the end there. Still not entirely sure what that is doing?
Also the data structure I’m trying to achieve looks like the following:
%{
content: "This is some content",
id: "46b7e047-a1f1-4fe1-b7f1-91c2aeb5910d",
inserted_at: #Ecto.DateTime<2016-06-29 11:49:53>,
title: "This is a new post"
comments: [%{
comment: "Some comment!",
id: "a94fc738-69e0-44e1-9e39-3204ad7f3878",
inserted_at: #Ecto.DateTime<2016-07-01 22:48:41>,
user: %{
name: "Alaister Young",
},
%{
comment: "Some comment!",
id: "a94fc738-69e0-44e1-9e39-3204ad7f3879",
inserted_at: #Ecto.DateTime<2016-07-01 22:48:42>,
user: %{
name: "Alaister Young",
}
}
]
}
The problem I’m having with this structure is I’m not sure how to deal with the list of comments with the nested users.
Thanks again!






















