Posted At : May 21, 2008 8:25 AM
| Posted By : Bob Silverberg
Related Categories:
ColdFusion,Coldspring,Transfer
Paul Marcotte wrote a blog entry describing how to automatically set a CreatedDate and ModifiedDate in your Transfer Objects when they are saved to the database. It is very well written and provides a great description of the problem, how Transfer observers work, and a solution.
I have used Transfer observers in a different manner, so I added a comment with a brief description to the blog entry. Dan Wilson suggested that it was too bad that such useful information was buried in a blog comment, so I decided to post it here as well. For the background, please check out Paul's entry.
[More]
Posted At : July 12, 2007 10:44 AM
| Posted By : Bob Silverberg
Related Categories:
ColdFusion,Coldspring,Transfer
I have different datasource names on my local machine, in my dev environment and in my production environment, and I wanted to figure out a way to automagically tell transfer which datasource to use based on the server it's running on. I couldn't find any programmatic way of doing this with Transfer, as it seems to require a datasource.xml file.
I decided to blog my solution, as it may be useful to others, or perhaps someone will point out a much better way to do it.
Here's what I'm doing:
I create 3 separate xml files, datasource_localhost.xml, datasource_dev.xml and datasource_prod.xml. Each one contains the name of the appropriate datasource.
In my Coldspring.xml file, where I define the Transfer bean, I use this code:
[More]