Orange is my favorite color

I’m preparing to migrate my application to a framework like Model-Glue. Because I have 70 tables and a large API already, I’m afraid of the cutting and pasting required to migrate my code to a Bean/DAO/Gateway structure. Brian Rinaldi’s Illudium PU-36 Code Generator would solve my problem except it didn’t support Postgres 8.x so I decided to add support myself.

For people using the CLAP stack with PostgreSQL, only a couple of tweaks are required. In cfcgenerator/com/cf/model/adminAPI/adminAPIFacade.cfc at line 52, add:

<cfelseif ((arguments.datasource.driver contains "Postgres") or (arguments.datasource.class contains "postgresql"))>
<cfreturn "postgresql" />

Then just download my postgresql.cfc adapter and place it in cfcgenerator/comf/cf/model/datasource and restart the cfcgenerator with the URL parameter


. I’m pretty sure I need to fine-tune the timestamp recognition and I’m going to hammer on this before I send it to Brian for inclusion but here it is. Now I need to figure out how to mitigate the Hungarian database notation in the beans… getVchFirstName() just looks ugly.


  1. Brian Rinaldi said:

    on August 14, 2007 at 12:08 pm

    Any interest in donating this to the project itself? Also, it would be useful to publicize this on the Illudium mailing list at

  2. brian said:

    on August 15, 2007 at 9:53 am

    Brian – please go ahead and include it with my permission. It seems to work fine as I have generated files for my database and I use just about all of the data types. If I find anything to update, I will do so and let you know. I don’t subscribe to the Google group so if you would drop a note there as well, that would be great. Thanks again for a really useful tool!

    One Q – any reason why in your service generators for Transfer you don’t re-use the methods? E.g., delete does a transfer.get() and then delete instead of calling get() through the service component itself. Sean also told me that it should be for create* but .get() without the ID argument seems to work just fine for me.

{ RSS feed for comments on this post}