Skip to content

Commit

Permalink
Merge branch 'issue20'
Browse files Browse the repository at this point in the history
  • Loading branch information
magandrez committed Jul 1, 2014
2 parents 3209e23 + f133adb commit 206c824
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/classes/SmartFactory.cls
Expand Up @@ -204,8 +204,9 @@ public with sharing class SmartFactory {

if (referenceObjectType == 'RecordType') {
setRecordType(obj);
} else if (cascade && referenceObjectType != obj.getSObjectType().getDescribe().getName()) {
// TODO avoid infinite loop for same-type references
} else if (cascade && referenceObjectType != obj.getSObjectType().getDescribe().getName() &&
referenceObjectType !='BusinessHours') {
// TODO avoid infinite loop for same-type references
System.debug('Creating reference to ' + referenceObjectType + ' for field ' + obj.getSObjectType().getDescribe().getName() + '.' + fieldDescribe.getName());
SObject reference = createSObject(referenceObjectType);
System.debug('Inserting ' + reference);
Expand Down

0 comments on commit 206c824

Please sign in to comment.