Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix for Issue 221 #449

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,7 @@ public virtual class fflib_SObjectUnitOfWork
{
for (Schema.SObjectType sObjectType : m_sObjectTypes)
{
m_relationships.get(sObjectType.getDescribe().getName()).resolve();
m_dml.dmlUpdate(m_dirtyMapByType.get(sObjectType.getDescribe().getName()).values());
}
}
Expand Down Expand Up @@ -897,7 +898,9 @@ public virtual class fflib_SObjectUnitOfWork

public void resolve()
{
this.Record.put( this.RelatedToField, this.RelatedTo.Id);
if (this.Record.get(this.RelatedToField) == null){
this.Record.put( this.RelatedToField, this.RelatedTo.Id);
}
}
}

Expand Down