yogiberr wrote:
when I look at my entity via the 2.5 designer, the IsNullable field is checked and greyed out..
YET, when I re-genrate the project, I get the error:
<<cannot convert from 'int?' to 'int'>>
In intellisense, I see the variable is listed as "int", NOT "int?"
Hi yogi, this is copied from the help:
.NET 2.0: support for Nullable(Of valueType) types
In .NET 2.0, Microsoft introduced the concept of Nullable valuetypes, which means that a field of type int/Integer or any other ValueType can be null / Nothing. By default, LLBLGen Pro generates all ValueTyped fields as Nullable(Of valueType) if the target platform is .NET 2.0 or CF.NET 2.0. You can overrule this setting on a per-field basis by setting the preference (and project property) GenerateNullableFieldsAsNullableTypes to true or false, which controls the value of the setting for each field if the field has to be generated as nullable or not. (See: Designer - Adding and editing entities). With Nullable types for valuetyped fields, LLBLGen Pro won't convert a null / Nothing value for a field to a default value, but will return null / Nothing from the field's property.
So, two questions:
1. Is ckecked the (net 2.0 +) generate as nullable type checkbox for that field?
2. Please post the exact lines where you are getting this error (compilation error I guess).
Anyway, just to be sure, could you regenerate in an empty folder and compile to see if there are problems?