Hi.
I'm migrating an application from
- LLBLGenPro 1.0.2005.1 release
- .NET Framework 1.1
- SD.LLBLGen.Pro.ORMSupportClasses.NET11.dll release 1.0.20051.60112
to
- LLBLGenPro 2.6 release
- .NET Framework 2.0
- SD.LLBLGen.Pro.ORMSupportClasses.NET20.dll release 2.6.8.1211
One line of code in the application I'm migrating is the following:
object fieldValue = entity.Fields[1].CurrentValue;
where entity is an entity object and entity.Fields[1] is a reference to an _EntityField2 _field that is mapped on an Int32 nullable database field.
With the LLBLGenPro 1.0.2005.1 release, with the corresponding database field set to null, the result of the previous line of code was that fieldValue was 0 (the dafault value of an Int32). After migrating the code, the result is that fieldValue is null. This different behaviour breaks the rest of my application code.
The "Generate as nullable type" field's property is not checked, so I supposed the behaviour was the same as in 1.0.2005.1 release.
Why the behaviour is different ?
Is there any way to make the code's behaviour the same as in 1.0.2005.1 release ?
Thanks for any suggestion.