Hi there,

We have a situation where we'd like to change .query on a class which
inherits from Entity.

Basically, for some classes we'd like to automatically and
transparently apply a .filter_by() to the usual .query when it is
accessed.

A ludicrous example would be easiest:

Say we'd like to create something like:

class SillyEntity(Entity):
    pass

So that I can inherit some classes from it, instead of Entity. And for
them,

cls.query

Should return cls.query.filter_by(something='whatever')

(Instead of inheritance, a @silly class decorator would also have been
a nice way to do this to a class)

How can one achieve something like this?

Thanks

- Iwan

-- 
You received this message because you are subscribed to the Google Groups 
"SQLElixir" 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/sqlelixir?hl=en.

Reply via email to