What data type is the id column.

The fact it is a sql_float should make no difference.

Mark

On Sat, Sep 26, 2009 at 5:02 AM, Aaron Roberson <[email protected]>wrote:

> For some reason transfer.get() is taking the integer I'm passing in as the
> key and converting it into a double when creating the select query.
>
> I'm using transfer v1.1 on ColdFusion 8 Enterprise.
>
> I have the following config:
>
> <package>
>             <object name="option" table="poll_options" >
>                 <id name="id" type="numeric" />
>                 <property name="answer" type="string" column="answer"
> nullable="false"/>
>             </object>
> ..................
> </package>
>
> I have a service with the following function:
>
>    <cffunction name="getoption" access="public" output="false"
> returntype="any">
>         <cfargument name="id" type="Numeric" required="true" />
>
>         <cfreturn variables.transfer.get("poll.option",arguments.id) />
>     </cffunction>
>
> When I call the function with service.getOption(1) I get the following
> error:
>
> Database Driver Error Message:
> [Macromedia][SQLServer JDBC Driver]Value can not be converted to requested
> type.
> Name-Value Pairs:
> (param 1) = [type='IN', class='java.lang.Double', value='1.0',
> sqltype='cf_sql_float']
>
> The sql that is being returned is below:
>
> SELECT poll_options_1.id, poll_options_1.poll_id, poll_options_1.answer, NULL 
> as transfer_parentKey, 1 as transfer_orderIndex,'poll.option' as 
> transfer_className,'' as transfer_parentClassName,'' as 
> transfer_parentParentClassName,'' as transfer_parentCompositeName,'false' as 
> transfer_isArray,'' as transfer_compositeName, 'false' as transfer_isProxied
>
> FROM poll_options poll_options_1
> WHERE poll_options_1.id  =  (param 1)   AND poll_options_1.id IS NOT NULL
> ORDER BY transfer_orderIndex ASC
>
> For some reason Transfer is converting the param to the sql into a double.
> It should be an integer. It appearantly is also using cf_sql_double instead
> of cf_sql_integer when creating the cfquery.
>
> Anybody have a clue why this is happening?
>
> >
>


-- 
E: [email protected]
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

--~--~---------~--~----~------------~-------~--~----~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
"transfer-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to