Luis Majano Forums Notification: Post to Datetime odd issue

Title: RE: Datetime odd issue
Thread: Datetime odd issue
Forum: Need Help?
Conference: ColdBox
User: lmajano

Hi tyman,

This is an issue more dealing with Transfer. You can read more on
this at the Transfer google group.
However, I have dealt with this issue in the past. Please see:
It shows you what
are the default null values Transfer uses on its objects. What I recommend you
do, is create a decorator for the contact object and create two methods for the
dLastLogin: getdLastLogin and setdLastLogin, where each take a string as their
input. I am providing a sample below:

name="getdLastLogin" output="false" access="public" returntype="string">
<cfset var endDate = "">
  <cfif not getTransferObject().getdLastLoginIsNull()>
<cfset endDate = dateFormat(getTransferObject().getdLastLogin(),
  <cfreturn endDate>
name="setdLastLogin" output="false" access="public" returntype="void"
hint="Set the date if found.">
  <cfargument name="myDate" type="string"
required="false" default=""/>
  <cfif isDate(arguments.mydate)>
A part from this, you need to note when the dLastLogin will be null: on insert
or update. Also, you populate the bean using the beanfactory as you show in your
code. But if a value for "dLastLogin" does not exist in the request collection,
the value will not be populated.

I usually set values like this manually. For
example, when a user logs in, I say:
I hope this works and you can understand why you are getting the error