No, I do implement a __str__ so that I can format up the composite
primary key. I didnt implement __repr__ at all.

Dan

On May 6, 10:25 am, Michael Bayer <[EMAIL PROTECTED]> wrote:
> On May 6, 2008, at 11:17 AM, [EMAIL PROTECTED] wrote:
>
>
>
>
>
> > Hi,
>
> > I have been using SQLAlchemy with Pylons. I map a table to a class and
> > use ORM(reflection) to work with it. I am using MySQL for the backend.
>
> > The class is Job and the table is "jobs". I can create and insert new
> > Jobs but whenever I try to get any back I get "None". This used to
> > work just fine and it still works fine for my other mapped classes. I
> > did change the jobs table quite a bit, but I restarted my computer and
> > it still wouldnt work.
>
> > There are records in the correct table and running the SQL generated
> > by all()(with echo turned on) returns rows.
>
> > Code:
> >>>> print Session.query(Job).all()
> > [None]
>
> > Any variation also fails.
>
> any chance that Job defines a __repr__() method with no return value ?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to