Open wimvelzeboer opened 2 years ago
@wimvelzeboer - the implementation of the new 'overloaded' versions of registerNew and registerDirty are not DRY -- there is too much code duplicated between the legacy versions of those methods and the new ones you are proposing here. Can you delegate from the single record versions to the new bulk version?
Yes, I see your point @daveespo. I now routed all the registerNew method overloads to the single bulk method.
I see that you routed the legacy registerNew methods into the new bulkified one. But you didn't address the registerDirty duplicated code -- can you do the same treatment to those methods?
Also, while you probably didn't create any reductions in code coverage with this change, you don't have any tests to exercise an invocation of the bulkified method (passing in more than on SObject instance) so please add those
@daveespo I now added bulk by default, and increased the unit-test coverage with bulk test methods.
I also added protected method, which avoid duplicated checks. For example. in the registerDirty method with relationships it previously check for non-event and supported SObjectTypes in registerDirty and then again in registerRelationship.
With this change we can link multiple records to the same parent record.
This change is![Reviewable](https://reviewable.io/review_button.svg)