Some days ago I coded a new feature for my project in work(ROM-rb with a sequel). At the beginning, the task seemed easy. After all, it was just another standard update of the entity without any significant corner cases. I have been lucky until I watched the structure of this entity. In a nutshell, every record from the table had a column parent which is… kind of another record from the same table.