@@ -59,12 +59,31 @@ public override bool IsOneToOne
59
59
60
60
public override bool IsDirty ( object old , object current , ISessionImplementor session )
61
61
{
62
- return false ;
62
+ if ( IsSame ( old , current ) )
63
+ {
64
+ return false ;
65
+ }
66
+
67
+ if ( old == null || current == null )
68
+ {
69
+ return true ;
70
+ }
71
+
72
+ if ( ForeignKeys . IsTransientFast ( GetAssociatedEntityName ( ) , current , session ) . GetValueOrDefault ( ) )
73
+ {
74
+ return true ;
75
+ }
76
+
77
+ object oldId = GetIdentifier ( old , session ) ;
78
+ object newId = GetIdentifier ( current , session ) ;
79
+ IType identifierType = GetIdentifierType ( session ) ;
80
+
81
+ return identifierType . IsDirty ( oldId , newId , session ) ;
63
82
}
64
83
65
84
public override bool IsDirty ( object old , object current , bool [ ] checkable , ISessionImplementor session )
66
85
{
67
- return false ;
86
+ return this . IsDirty ( old , current , session ) ;
68
87
}
69
88
70
89
public override bool IsModified ( object old , object current , bool [ ] checkable , ISessionImplementor session )
@@ -170,7 +189,7 @@ public override object Assemble(object cached, ISessionImplementor session, obje
170
189
/// </summary>
171
190
public override bool IsAlwaysDirtyChecked
172
191
{
173
- get { return false ; } //TODO: this is kinda inconsistent with CollectionType
192
+ get { return true ; } //TODO: this is kinda inconsistent with CollectionType
174
193
}
175
194
176
195
public override string PropertyName
0 commit comments