Previously, it doesn't support the self referencing association, let say a User has a parent which references to the User, it will then always recursively creating the parent, resulting an endless loop.
Since the creation is using recursive method, I add that support by checking whether the owner & related field in Ecto.Association.BelongsTo has a same value (add base case for the recursive function).
Previously, it doesn't support the self referencing association, let say a
User
has a parent which references to theUser
, it will then always recursively creating the parent, resulting an endless loop.Since the creation is using recursive method, I add that support by checking whether the
owner
&related
field inEcto.Association.BelongsTo
has a same value (add base case for the recursive function).