On Sep 27, 2:28 pm, jason kirtland <[EMAIL PROTECTED]> wrote:
> Andy Davidoff wrote:
> >Reflectionof temporary tables underMySQLworks around revision 4000
> > and probably as recently as May but doesn't seem to work under
> > revision 5000 or later; I get a NoSuchTableError.  Is this change
> > intentional?
>
> > If the only change I make to my code is to create and reflect a normal
> >tableversus a temporarytable, then SQLA works as expected.
> > Unfortunately, temporary tables offer me an easy concurrency crutch,
> > so I deeply regret this missing functionality.
>
> > I could dig deeper into when and where this stopped working, but
> > perhaps I'm the one missing something.  What is it?  :-)
>
> Give it a try with the trunk, r5129.

This fixes the first part of this problem, but unfortunately the `show
create table` is performed in the connection, not the session in which
the temporary table was created.  MySQL doesn't expose temporary
tables between sessions, so the `show create table` raises a MySQL
exception due to a non-existent table.

A solution that works for me (but may not be feasible for everyone) is
to create non-temporary tables with identical names and schemas which
are then shadowed by the temporary tables inside the session.  SQLA
can then reflect the non-temporary tables visible in the connection
but actually operate on the temporary tables visible in the session...
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to