try setting echo='debug'. it usually tells all. if any columns in
the primary key are NULL, the query won't return an object. If you
have partially null primary keys, set allow_null_pks=True on your
mapper.
On Mar 17, 2009, at 8:08 PM, Jonathan Vanasco wrote:
>
> I have query on a view that looks like this:
>
> query= dbSession.query(_class).filter('entry_status = 2').order_by
> ( _class.c.entry_authored_on.desc() ).limit(3).offset(0)
> results= query.all()
> print query
> print " - - - - - -"
> print results
> print "== == =="
>
> this always returns no results.
> however the sql query is valid -- and returns results in postgres
>
> if i remove the limit(3) clause, I get results
>
> this happens with limiting any number , whether or not I have an
> offset, and no matter what the offset is.
>
> other selects like this on views work absolutely fine. its just on
> this one view. its completely puzzling.
>
> anyone have a clue ?
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" 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/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---