Mapped classes don't get instrumented attributes until they are instantiated at least once.

Issue #773 resolved
Former user created an issue

As it says. (I'm talking about the class-level column attributes that can be used like `.filter(User.name == "bob)" etc.)

I suppose there's a logical technical reason for this behaviour, but I think it's still rather unexpected from the perspective of the user. I spent a while tracking down some bugs I was having because of this.

Comments (3)

  1. Mike Bayer repo owner

    your mappers are not compiled. issuing compile_mappers(), or starting up a Session.query(), etc. will fix this. the issue itself is #758 .

  2. Log in to comment