@@ -50,6 +50,15 @@ public interface fflib_ISObjectUnitOfWork
50
50
* @param relatedToParentRecord A SObject instance of the parent record (should also be registered as new separately)
51
51
**/
52
52
void registerNew (SObject record , Schema.SObjectField relatedToParentField , SObject relatedToParentRecord );
53
+ /**
54
+ * Register newly created records to be inserted when commitWork is called,
55
+ * it also provides a reference to the single parent record instance (should also be registered as new separately)
56
+ *
57
+ * @param records newly created records of the same SObjectType to be inserted during commitWork
58
+ * @param relatedToParentField A SObjectField reference to the child field that associates the child record with its parent
59
+ * @param relatedToParentRecord A SObject instance of the parent record (should also be registered as new separately)
60
+ **/
61
+ void registerNew (List <SObject > records , Schema.SObjectField relatedToParentField , SObject relatedToParentRecord );
53
62
/**
54
63
* Register a relationship between two records that have yet to be inserted to the database. This information will be
55
64
* used during the commitWork phase to make the references only when related records have been inserted to the database.
@@ -59,6 +68,15 @@ public interface fflib_ISObjectUnitOfWork
59
68
* @param relatedTo A SObject instance (yet to be committed to the database)
60
69
*/
61
70
void registerRelationship (SObject record , Schema.SObjectField relatedToField , SObject relatedTo );
71
+ /**
72
+ * Register a relationship between two records that have yet to be inserted to the database. This information will be
73
+ * used during the commitWork phase to make the references only when related records have been inserted to the database.
74
+ *
75
+ * @param records Existing or newly created records
76
+ * @param relatedToField A SObjectField reference to the field that relates the given records to the relatedTo record
77
+ * @param relatedTo A SObject instance (yet to be committed to the database)
78
+ */
79
+ void registerRelationship (List <SObject > records , Schema.SObjectField relatedToField , SObject relatedTo );
62
80
/**
63
81
* Registers a relationship between a record and a Messaging.Email where the record has yet to be inserted
64
82
* to the database. This information will be
0 commit comments