OneToOneField between two databases fails
|Reported by:||Benjamin Wohlwend||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||master|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
When model A is in the default database and model B is in another database, and there is a OneToOne relation between the two models, the lookup fails (raising a DoesNotExist, or if the tables aren't in both databases, a ProgrammingError). Writing works, only reading fails. I have no idea of the ORM internals, so I might be completely wrong, but I think the cause is a simple copy&paste error. Fix and test is in the patch.