Hello,
Thank's for reply.
Currently it is not meant to be possible to create an entity that the
session is not aware of, but you might be able to achieve that by
replacing __init__ **after** the class is declared (instead of
overriding it inside the class declaration).
I will follow this way, thank's !
On 13/02/2017 20:02, Alessandro Molina wrote:
On Fri, Feb 10, 2017 at 4:20 PM, Bastien Sevajol
<[email protected] <mailto:[email protected]>> wrote:
I tried to decorate __ini__ method of my classes but without
success (_InitDecorator always encapsulate my decoration). How can
i change that ? I know i can make a
/session.expunge(my_new_instance) /but i want the same behaviour
for all model class instanciations.
The __init__ method is decorated by the metaclass, so the logic that
adds it to the session is actually wrapping your init. That it so
ensure any Ming specific behaviour happens after you already
initialised the object.
Currently it is not meant to be possible to create an entity that the
session is not aware of, but you might be able to achieve that by
replacing __init__ **after** the class is declared (instead of
overriding it inside the class declaration).
--
You received this message because you are subscribed to a topic in the
Google Groups "TurboGears" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/turbogears/FpBFC69a2Vc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
[email protected]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.