my immediate thought on that code is to replace TefProperty with a function,
since you are discarding TefProperty in any case:
def propInt():
return sa.Column(key, Integer)
not sure how the previous Extension version of the code did this differently,
this is really a class creational pattern.
On Sep 21, 2012, at 2:59 AM, Tefnet Developers wrote:
> Hi,
> we are trying to migrate our old *Extension based SQLA code to new - event
> based.
> We also have class based properties that we want to keep. With old SQLA we
> have had to monkey-patch _as_declarative function to populate our properties.
> I wonder if it is possible to avoid doing it with events? The only close one
> we found is "mapper_configured", but I'm afraid it is executed too late.
> Anyway... I've prepared some short example code. If you could take a look and
> advise if/how it can be done...
>
> To check out where is the problem change USE_EVENT value from True to False.
> https://gist.github.com/3757273
>
> Regards,
> Tomasz Jezierski
> Tefnet
>
> --
> 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.
>
--
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.