I'm working on a plugin that would require a custom element to have a hierarchy, as in, possibly have a parent set or not. Much like entries have when used in a structure.
I've got my element set up and all the custom fields and the title get saved just fine, however I've hit a wall trying to get them have a parent.
I've tried setting the parent property to another element and after I hit save, it does not seem to properly register it.
Is there a specific way to go about this? The documentation is rather sparse on implementing a hierarchical custom element.
Any pointers or examples on how to implement this would be greatly appreciated.