self referential (n-n relationship) belongs many controller

Hi all,

I ve some troubles in my small acpplication (only 2 tables).

I want to follow up tasks but these tasks are linked to others tasks.
So I ve tried to do store the nn relationship in other table called
links

1st table : tasks

columns : id | infos neutral... (as title, description etc ...)