Otis wrote:
What's the llblgen pro version and runtime lib buildno you're using?
Is the entity new? If you've set the field to null already with SetNewFieldValue(index, null), didn't that action make the entity dirty already?
I am using 1.0.2005.1.
The entity is not new.
I looked into it further, and the problem is that when I set the value to null and save it to the database, the refetch does not set the CurrentValue or DBValue of the field. In ReadRowIntoFields, there is a foreach loop that goes through all the fields, setting them from the values[] array. My field gets its IsNull flag set, as it should, but fieldToSet.ForcedCurrentValueWrite is never called, and therefore the field never gets its CurrentValue or DBValue set from the results of the refetch. Because the CurrentValue never gets set to the "typeDefaultValue" it remains Null. It looks like there may be a "else" missing in...
if(fieldsPersistenceInfo[columnOrdinal].TypeConverterToUse!=null)
At this point the entity is flagged as not IsDirty (correctly) but the next time I set the value of this field value to Null, the DetermineIfFieldShouldBeSet returns "True" as the CurrentValue is STILL Null, causing the field to be set again, and the IsDirty flag to be set....