This change was discussed before:

http://markmail.org/message/uh5ufkpi7xdb2zbu

The main reason that people might not want to bind their metadata is
that they could end up with a multi-db solution where you want to
associate with a particular database on a per-request basis -- eg send
all your http GET requests to one of many slaves, and the post
requests to a master DB.

And it is possible to do everything that you can do with bound
metadata without it, you just need to pass around an engine or
connection that is bound.   And since those are bound at the object
level rather than the module level, you have a lot more flexibility.

Of course that does come at a cost, and the bound metadata does
provide users with a nice API, which I think is worth it in lots of
cases.

Anyway, that's my 2c worth.  Take it for what you will.

--Mark Ramm

On Tue, Dec 16, 2008 at 11:47 PM, percious <[email protected]> wrote:
>
> Hey guys.
>
> I'd like to add the following to the init_model() function in mode/
> __init__.py in the default template:
>
> metadata.bind = engine
>
> This is to allow dbsprockets (catwalk2) to have access to the bound
> metadata.  Without this change, those two items will not work out of
> the box.
>
> cheers.
> -chris
> >
>



-- 
Mark Ramm-Christensen
email: mark at compoundthinking dot com
blog: www.compoundthinking.com/blog

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" 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/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to