Open bsmith11 opened 8 years ago
The semantics of conditionally creating the object on an instance level method are a bit strange to me.
Also, I'm not sure that it provides any functionality that you couldn't obtain by implementing rzi_existingObjectForDict:
and overriding rzi_importValuesFromDict:withMappings:
. To me the implementation via over-rides would make more sense. I'd also prefer not to expand the API surface area if we don't have to.
That said, what and how to over-ride methods in RZImport aren't always as clear. I'm just not sure what problem we're solving here.
Edit: Early submit.
Agreed about the instance method determining whether to return an instance. I think changing it from shouldImport to willImport could be a good idea. The use cases for not importing a single object are probably slim to none. I do like having the pre and post callbacks though, as it provides a clear place to handle weird situations that usually come up when dealing with less than ideal APIs
@arrouse @ZevEisenberg @KingOfBrian @mgorbach @jvisenti
Should satisfy #17