10 messages in com.googlegroups.sqlalchemy[sqlalchemy] Re: Avoiding reflection ...| From | Sent On | Attachments |
|---|---|---|
| Don Dwiggins | 22 Feb 2008 18:05 | |
| Michael Bayer | 22 Feb 2008 18:17 | |
| Don Dwiggins | 25 Feb 2008 10:08 | |
| Rick Morrison | 25 Feb 2008 10:53 | |
| Don Dwiggins | 25 Feb 2008 12:10 | |
| Rick Morrison | 25 Feb 2008 12:42 | |
| Waldemar Osuch | 26 Feb 2008 11:45 | |
| Rick Morrison | 28 Feb 2008 16:57 | .patch |
| Don Dwiggins | 29 Feb 2008 11:35 | |
| Michael Bayer | 29 Feb 2008 12:44 |
| Subject: | [sqlalchemy] Re: Avoiding reflection (was: Re: Reflecting tables with foreign keys)![]() |
|---|---|
| From: | Waldemar Osuch (wald...@gmail.com) |
| Date: | 02/26/2008 11:45:32 AM |
| List: | com.googlegroups.sqlalchemy |
On Feb 25, 1:10 pm, Don Dwiggins <d....@dondwiggins.net> wrote:
Rick Morrison wrote:
Ugg, I am not a big table reflection fan....:-(
I am in the middle of readying a presentation, so unless someone else wants to jump on this, I'll take a look at this later on this week, along with integrating a reflection speed-up patch I remember from a while back.
Thanks. I'm willing to use something other than reflection, if there's a good way I can avoid having to duplicate my schema (or significant chunks of it) in SA declarations. I'd like to stick to the DRY principle if at all possible. (I'm dealing with a legacy DB, and can't really take SA declarations as "ground truth".)
The approach I have taken is to to dump the legacy database definitions into python module using autocode. http://www.sqlalchemy.org/trac/wiki/UsageRecipes/AutoCode. (I had to tweak the recipe slightly to work with Oracle)
The resulting code needed clean up but still it was a win - no more waiting for the reflection to finish. Now if DB schema changes I have to update my module but I do not mind, the changes are rare. It is a legacy database after all :-).
Waldemar
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqla...@googlegroups.com
To unsubscribe from this group, send email to
sqla...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---





.patch