Code Generators and Dates

I've been working on an application (more about that later) and I've been using Illudium Code Generator to make CFCs for me.

I kept having issues with the Service layer and getting the error message "Bean creation exception in jobsearch.components.correspondenceService".  I tried tracking it down, tweaking some configurations to match the other templates that were working.  Someone in #coldfusion gave me a good debugging tip - createObject the problem components and do a dump.  Once I did so, it was immediately apparent just what the problem is. 

I use MySQL, and in two of the tables, I'm using a date field.  Here is how Illudium Code Generator sees these fields:

<cfargument name="responsedate" type="" required="false" />


For some reason, MySQL date fields do not get interpreted properly such that nothing is filled in for the type field. So, you must manually edit these fields, and also the CF_SQLTYPE fields.

Aliasing MySQL Startup

I've got MySQL installed, via binary download from MySQL.com, on my Leopard setup. Much of the time I access my databases through Terminal. It's really easy to set up an alias in your bash .profile so that all you need to do is type one word to start up MySQL, then type your password. Here's how I've set up my alias:

alias startmysql=""mysql -u name_of_user -p""

Note that ""name_of_user"" should be replaced with the name of the account that you use to access MySQL. You shouldn't be using root, in any case, even on your personal laptop.

BlogCFC was created by Raymond Camden. This blog is running version 5.9.004. Contact Blog Owner