Oracle 8 strikes again. But our client's current legacy application
requires it (until we can get them off the app).
Anyway, when Oracle 8 is detected, I wish to convert certain mapper
properties' lazy attribute from False => 'subquery' because oracle 8
isn't smart enough to run the query anywhere near efficiently (but 9i
is).
So, after all the mappers are compiled (I need backrefs also), I'm
looping through the _mapper_registry and detecting which properties
need to be converted if the oracle is 8i.
Unfortunately for me:
prop.lazy = 'subquery'
prop.strategy_class = strategies.factory('subquery')
isn't enough because the prop.strategy was already initialized I
surmise.
Because of potential circular references and complications with
backrefs and future mapped classes not being mapped to a table until
after mapper() is invoked for the class, I do not think I can figure
out whether lazy should be False vs. 'subquery' during the mapper()
invocation...(at least trivially), so I am waiting until after all
mappers are compiled.
Can you think of any solutions for me? Any way to change a properties
lazy attribute after it's been instantiated? Any way to clone the
property and replace it with a new one with a difference lazy
attribute?
Thanks as always,
Kent
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" 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/sqlalchemy?hl=en.