Closed GoogleCodeExporter closed 8 years ago
Please close this one.
The problem is: I have more than one database and Django still lacks multiple
database support (coming, I
know).
So in Database B I'm using a synonym to the dbo.auth_user table in Database A.
Because I want to share the
same users between applications accessing different databases! This synonym
makes it possible for all
operations on B.dbo.auth_user to work on my App when it is really accessing
database A via synonym.
Except... SELECT CAST(IDENT_CURRENT(%s) as bigint) % [table_name] does not work
on synonyms... It seems
to always return null.
The workaround for me, for the time being, is to right after writing to
auth_user, I need to reload it from the
DB.
Unless someone has a better idea.
Sorry for jumping the gun and posting an error here. It still might be useful
to someone else that might be
using the same shenanigans...
Thanks!
Original comment by ce.lo...@gmail.com
on 5 Nov 2009 at 3:11
Another workaround: use a view instead of a synonym. It works fine.
Original comment by ce.lo...@gmail.com
on 5 Nov 2009 at 4:19
Original comment by cra...@gmail.com
on 19 Nov 2009 at 9:54
Original issue reported on code.google.com by
ce.lo...@gmail.com
on 5 Nov 2009 at 2:58