The qx::clone function is already recursive : all levels of relationships should be cloned.
I assume means all relationships bound to that object are cloned but nothing after that. Relationship hops 2 through n indicate the need for a special recursive clone. Is that correct?
The biggest challenge I'm having at the moment (whilst implementing my own recursive clone), is how to manage the IDs more effectively. If I clone my top level obj and give it a new ID, I have to iterate over nearly everything and update their own reverse relationship entry so that they reference the new object and not the old one.
The problem is compounded further when I have an object with multiple n-1 and 1-n relationships that is coming from xml persistence. I don't understand when attempting clone how I'm supposed to manage/re-index all of the relationships so that when pushed to a database this object looks like an entirely new instance, nothing shared.
Make sense? I'm not sure it's the typical use case for this framework but the ability to replicate a file obj repeatedly as a new instance in my db is essential.
Thanks in advance!