Hello, everybody!
I have a problem with comparing numeric fields.
DB is Postgres, Castor Implementation-Version:
0.9.4blaze,Specification-Version: 0.8

oql = " select o from user o where aDate = $1";
I bind new Bigdecimal( new Date().getTime() ).

And have the exception:
java.sql.SQLException: ERROR:  Unable to identify an operator '=' for types
'numeric' and 'double precision'
        You will have to retype this query using an explicit cast

 SQL: SELECT
"bsuser"."id","id_object"."name","id_object"."creation_date","id_object"."re
move_date","id_object"."update_date","id_object"."class","id_object"."parent
_id","bsuser"."user_type","bsuser"."info_id","bsuser"."system_id","bsuser"."
account_id","bsuser"."last_billing_date","bsuser"."ext_id","bsuser"."live_st
ate","bsuser"."password" FROM "bsuser","id_object" WHERE
"bsuser"."id"="id_object"."id" AND ("bsuser"."aDate" = 1009352541238)


It will work if I will cast it in SQL : ....AND ("bsuser"."aDate" =
1009352541238::numeric)

But I don't know how to do it using castor.
I had idea to call stored procedure converting the value to numeric but
failed to call it in OQL query.
All attemps to add "::numeric" to OQL query doesn't work too.
I've tried all combinations of types like where aDate = $(long)1, etc......
And have no idea now.

Thanks in advance.

Andrey Chernyh
<[EMAIL PROTECTED]>
Plesk Inc.

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to