I'm looking over your suggestions. The first is a simple mistake, thanks for catching it.
I don't agree that your second suggestion is necessary:
1) In the first case (an empty array), there is no harm, because at most you might get an extra function call. Since this is saving (not getting), there isn't any real performance boost.
2) In the second case (not empty), the array should always be edited by reference in PHP 5+, which is all that is supported. Re-assigning it isn't really necessary.
3) Finally, the saving isn't really intended to truly be recursive. It's just better than the old method (manually supporting N-levels deep).
I think you are correct in your third suggestion. However, using the solution you provided will not work, as all fields will be copied over, even if there is a collision. I'll work up a solution.
--------------------
As for your speed improvement suggestion, I think that has some real possibility. However, I don't think you really need to override the built-in DMZ method. Instead, take advantage of the get_sql method introduced in DMZ 1.6.
It has one limitation (which you can manually copy from the get method, or just document): traditional related queries won't work. This means that queries like this:
Code:
$user->bug->get_streaming();
Would have to be rewritten as:
Code:
$bug = new Bug();
$bug->where_related($user)->get_streaming();
If you want to duplicate the existing functionality, look at the first if block of the get method.