ColdFusion Illudium PU-36 Code Generator

Go To StackoverFlow.com

2

When generating models from postgresql with ColdFusion Illudium Code generator the boolean values get converted to varchar in the cfqueryparam and varchar gets converted to char. Does anyone have a fix for this issue?

http://cfcgenerator.riaforge.org/

2012-04-04 18:17
by John Gagliardi


8

1.open the file cfcgenerator/com/cf/model/datasource/postgresql.cfc
2.around line 63 replace bit/bool with this

    <!--- bit / bool --->
        <cfcase value="bit,boolean">
            <cfreturn "cf_sql_bit" />
        </cfcase>
        <cfcase value="bool">
            <cfreturn "cf_sql_varchar" />
        </cfcase>

3.around line 101 replace strings with this

<!--- strings --->
        <cfcase value="char">
            <cfreturn "cf_sql_char" />
        </cfcase>
        <cfcase value="varchar,character varying,character">
            <cfreturn "cf_sql_varchar" />
        </cfcase>
        <cfcase value="text">
            <cfreturn "cf_sql_longvarchar" />
        </cfcase>
2012-04-04 18:23
by sweyrick
Wow. Thanks for the quick reply. You are awesome - John Gagliardi 2012-04-04 18:24
The cfcgenerator is a great tool, highly configurable. +1 for a nice answer from a new guy ;) Welcome to stackoverflow - Leigh 2012-04-04 18:30
Ads