StrataFrame Forum

Mapper Error?

http://forum.strataframe.net/Topic1142.aspx

By Daniel Essin - 5/8/2006

I've got a table in the database with all fields set to allow null except for the PK fields. After importing into the DDT, the allow null setting is correct. When I use the mapper to configure a bo for this table it has all the fiellds to "Do Not Allow Null". This is probably not right.
By StrataFrame Team - 5/9/2006

The BOMapper's allow null option and the "Allow Null" setting within the DDT are independent; one does not pull from the other.  Whether you have the "Allow Null" option checked or not, to configure a business object to use NULL values, you need to configure the field within the BOMapper to the appropriate value, and set the "AllowNullValues" property on the business object to "true."  The AllowNullValues property doesn't determine what values you can set on your field properties, but tells the business object not to initialize new rows (if the value is false, when you create a new row through NewRow() or Add(), the business object initializes all values within the new row to remove the DBNull.Value values.
By Daniel Essin - 5/9/2006

Why is it called AllowNullValues rather than DontInitInNewRow?
By StrataFrame Team - 5/9/2006

Good question.  That name would be more descriptive of what it does.  If we make a change, though, it will have to be at a version change, so right now, it's going to stay as AllowNullValues.