Hi,

I do a simple query and got very strange error:

File '/home/max/projects/site-baseline/doupy/doupy/controllers/
salarydb.py', line 432 in record
  c.user = s.query(WordpressUser).get(c.rec.user_id)
File '/home/max/projects/site-baseline/py/lib/python2.5/site-packages/
SQLAlchemy-0.5.2-py2.5.egg/sqlalchemy/orm/query.py', line 446 in get
  key = self._only_mapper_zero("get() can only be used against a
single mapped class.").identity_key_from_primary_key(ident)
File '/home/max/projects/site-baseline/py/lib/python2.5/site-packages/
SQLAlchemy-0.5.2-py2.5.egg/sqlalchemy/orm/mapper.py', line 1048 in
identity_key_from_primary_key
  return (self._identity_class, tuple(util.to_list(primary_key)))
TypeError: 'NoneType' object is not iterable

The stange thing is that it only occurs if there is no matching record
in the database. If there is a user with given id it works fine. Is it
a bug or what?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to