Skip to content

Commit 551d170

Browse files
David EllingsworthDavid Ellingsworth
David Ellingsworth
authored and
David Ellingsworth
committed
GH2552 Only check if the OneToOneType is dirty when it is nullable.
1 parent e2b56ed commit 551d170

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/NHibernate/Type/OneToOneType.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,11 @@ public override object Assemble(object cached, ISessionImplementor session, obje
204204
}
205205

206206
/// <summary>
207-
/// We always need to dirty check as our identifier is dependent on
208-
/// whether or not a persistent entry exists.
207+
/// We only need to dirty check when the identifier can be null.
209208
/// </summary>
210209
public override bool IsAlwaysDirtyChecked
211210
{
212-
get { return true; }
211+
get { return IsNullable; }
213212
}
214213

215214
public override string PropertyName

0 commit comments

Comments
 (0)