Hi there,

On 7/22/06, Jorge Vargas <[EMAIL PROTECTED]> wrote:
> hi Amar while creating the support for SA 2.0  it was discuss whether to use
> or not ActiveMapper, the conclusion was to use it whenever it was resonable
> but not force anyone to it.

Using Activemapper for generated classes is fine, and I agree totally
with that decision. However, I shouldn't have to mess with the
IdentityProvider or the VisitManager.

The problem is that those classes use ActiveMapper idioms when calling
the user-provided classes, such as the get_by and get methods. Now,
it's easy to provide those on hand-written classes, but shouldn't be
neccessary.

In identity/saprovider.py - I changed
"visit_class.get_by(visit_key=self.visit_key)" to
"session.query(visit_class).get_by(visit_key=self.visit_key)" (and the
same for other classes). That seemed sufficient and it doesn't hurt
ActiveMapper classes. Of course, unless this makes it into TG source
code, I have to make this change myself each time I upgrade TG.

Arnar

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to