Take a look at this: http://docs.transfer-orm.com/wiki/Handling_Null_Values.cfm
The issue is that ColdFusion does not actually support nulls, so when the data is retrieved from the database, if it is a null, it must be stored in your business object as _something_. The default way of storing a numeric null (which is shown on the above mentioned page) is 0. That's why you're seeing a 0. Transfer still understands that it's a null, but it shows you a 0. You can change that (what CF outputs for a numeric null) in your tarnsfer.xml config file. This is described on the above page as well. Hope that helps, Bob On Wed, Oct 15, 2008 at 1:43 PM, Steve Brownlee <[EMAIL PROTECTED]> wrote: > > I've been reading threads about this topic for approximately 3 hours > this morning, trying different suggestions that people have posted and > I still don't have a solution to what, in my mind, is a simple issue. > > I've got a nullable NUMBER field in a table named QTY_OVERRIDE. > Here's the Transfer definition: > <property name="QTY_OVERRIDE" type="numeric" column="QTY_OVERRIDE" > nullable="true" /> > > Now, if the value in the database is actually NULL, I want that in my > TransferObject, instead of the default value of 0, so I forced this in > the configure() method of the Decorator: > <cffunction name="configure" returntype="void" output="false"> > <cfset setQTY_OVERRIDENull() /> > </cffunction> > > It appeared from everything I've read that this would be enough, and > yet when I use the following command... > <cfoutput>#myObj.getQty_override()#</cfoutput> > > I still get 0 as the output when the value is NULL or 0 in the > database. > > What am I still missing? > > Muchas gracias in advance. > > - Steve > > > -- Bob Silverberg www.silverwareconsulting.com --~--~---------~--~----~------------~-------~--~----~ Before posting questions to the group please read: http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer You received this message because you are subscribed to the Google Groups "transfer-dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/transfer-dev?hl=en -~----------~----~----~----~------~----~------~--~---
