afawcett / apex-sobjectdataloader

A generic native SObject data loader implementation using Apex JSON support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Callback overrides default reference resolving

itsmebasti opened this issue · comments

We had to use a callback during de-serializing a while ago.
Half a year later the feature threw errors because we added new Sobject types.
The de-serialization failed, because the new objects mixed up the serialized order,
and the SObjectDataloader was not resolving them for us, because we defined that callback.

So the problem is, whenever you define a callback, the default reference resolving algorithm is skipped.
This is wrong, I would assume that the resolver callback only affects references, that are not resolvable.

This is highly related to #28 it's where we discovered this behavior, but didn't knew yet that the callback was skipping default resolving.

Sorry, didn't know committing in my own branch spams this whole thing.