Mike-

Thanks for the feedback , and the great tutorial -- i had actually
used it as a reference when playing around with reflection.

I have a few questions left...

> You can define all tables in a single metadata unless you're doing something 
> really wacky.
ha.  ok.


> 1) Don't bind any engines to the session or metadata.  Instead, pass
> the appropriate engine to every database-accessing method using the
> bind= argument.  This is simple and non-magical, but it requires you
> to be verbose about engines.

that actually sounds ideal.

2 questions ( sorry if they seem ignorant, i just can't find the
answers )
 i. how would i access a specific engine to handle transactional
stuff ? would that be through a global item or in an object?
 ii. how would i specify a new object to be using an engine.  does it
get a bind too?

> Your "configure" engine is a special case because you use it only at
> startup.  Your model.init_model() function can use it to populate some
> Python object, then let it go out of scope and it will be closed.  

so i don't need to do anything special for it to close?  awesome.
under mod_perl i have to do quite a bit to lose the db from the pool.

> You could have problems if you access the same database records in the
> same session via different engines. For instance, if you load an ORM
> record into one variable via 'readonly', then load it into a different
> variable via 'write' and modify it, SQLAlchemy may not realize they're
> the same record.  

I wouldn't expect it to.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to