Null in Boolean Fields coming back as False

11 views
Skip to first unread message

Sandra Clark

unread,
Jan 26, 2012, 2:36:46 PM1/26/12
to transf...@googlegroups.com
I'm working with really bad data.  Can't be helped.  In many instances, a field is a boolean, but can be True/False or Null (meaning it wasn't used in a particular year).  The table is set up with a boolean and Null.

Using a transfer.get(), all my null boolean fields are coming up as False

Any way to force the get to load in "" or NULL instead?

Transfer version is  1.1., but I'm hesitant to move to 2 unless that is the only way to solve my problem. 

Transfer object for an example is:  (The field I'm referncing in this case is "Completed"

<object name="SubTopics" table="[dbo].[SubTopics]" decorator="sbirmgmt.model.data.topics.SubTopicsDecorator">
<id name="SubTopicID" type="numeric" />
<property name="SubTypeID" type="numeric" column="SubTypeID" nullable="true" />
<property name="SubTopicNumber" type="string" column="SubTopicNumber" nullable="false" />
<property name="SubTopicTitle" type="string" column="SubTopicTitle" nullable="true" />
<property name="SubTopicText" type="string" column="SubTopicText" nullable="true" />
<property name="CurrentDivision" type="string" column="CurrentDivision" nullable="true" />
<property name="HistoricDivision" type="string" column="HistoricDivision" nullable="true" />
<property name="Completed" type="boolean" column="Completed" nullable="true" />
<property name="TechRepID" type="numeric" column="TechRepID" nullable="true" />
<onetomany name="SubTopicMetaData" lazy="true">
<link to="topics.SubTopicMetaData" column="SubTopicID"/>
<collection type="array">
<order property="SubTopicMetaDataID" order="asc"/>
</collection>
</onetomany>
</object>

Thanks for any help

Sandy Clark

Sandra Clark

unread,
Jan 26, 2012, 3:17:53 PM1/26/12
to transf...@googlegroups.com
Answered my own question. 
If I set the transfer object property to string, then it works as necessary.  Thought I would put it here just in case someone else runs into this problem.

And trust me if I could have designed this database from scratch, this would never have happened.
Reply all
Reply to author
Forward
0 new messages