query.get() does not support NULL primary key elements
Issue #1135
resolved
this because it re-uses the mapper._get_clause and just sets bind params. Either the clause needs to be modified/generated on the fly or the "eq" operator in compile() needs to detect "==None". Probably the former here.
Comments (6)
-
Account Deleted -
reporter get(None)
is not a valid use case. we mean primary keys with null elements:get([None](2,))
. -
reporter - changed milestone to 0.6.0
-
reporter the attached patch should be most of the basic idea here. cleans up some nasty cruft in lazyloader too. can consider backporting this to 0.5 as well.
-
reporter - changed status to resolved
-
reporter - removed milestone
Removing milestone: 0.6.0 (automated comment)
- Log in to comment
(original author: ged) Not sure if this was the meaning of the original ticket, but query.get(None) produces the following traceback instead of returning None:
This is because util.to_list returns None