Hi,
Not sure if I'm misunderstanding what's happening, whether I have a
bug, or whether this is normal behaviour, but as far as I can tell
mapped objects that are returned from a query do not have their
constructor called. Is that correct?
In a bit more detail - I have a mapping defined to class Metric, and a
query() returns a Metric instance, with the correct attributes, but if
in the constructor I have something like:
class Metric(object):
def __init__(self):
self.constructor_called = True
then the instance returned by query does not have the
"constructor_called" attribute (my actual code is more complex, but
that's the general idea).
Is this normal behaviour? Is there any way to get the constructor to
be called? I can work around this if not, but would liek to be sure I
am not ignoring an error of some kind.
I've looked through the documentation, but couldn't find anything
relevant. Apologies if I've missed the obvious. This is with version
0.4.7p1
Thanks,
Andrew
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---