On Jan 21, 11:48 am, Paweł Stradomski <[email protected]> wrote:

> What exactly are you trying to achieve?

one of the tenets of activerecord is that constructing an object with
a primary key returns the existing object implicitly.

my example meant to read:

def __new__(cls, *args, **kwargs):
    if args:
        obj = self.Session.query(cls).get(args)
        if obj:
            return obj

    return object.__new__(cls, *args, **kwargs)
--~--~---------~--~----~------------~-------~--~----~
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