I've found a workaround to this by sending the filter in string variable and it works.
here is an example:
------------
f = u'sometable.qty * sometable.price = 24'
q_sometable = q_sometable.filter(f)
----------

I'm using sqlite because I want a light database on my development machine. When this project finish, I'll use postgresql on the production server. I hope it's only a sqlite only bug.

[email protected] yazmış:
i think i had a similar problem with sqllite, i moved the project to
mysql and it worked fine...

On Jul 22, 11:47 am, Timuçin Kızılay <[email protected]> wrote:
I'm trying to make a query like this:

prc_filter = 24

q_sometable = DBSession.query(model.Sometable)
q_sometable = q_sometable.filter((model.Sometable.qty *
model.Sometable.price)==prc_filter)

This do not give any error and when I look at the paster log I see that
it generated a query with where part like this:

------------
WHERE sometable.qty * sometable.price = ?

12:41:24,272 INFO  [sqlalchemy.engine.base.Engine.0x...ba0c] ['24']

----------

When I copy the quety from terminal window and run it in a sqlite tool
(SQL Database Browser) it works.

Can anyone help?
what am I doing wrong?


--
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en.

Reply via email to