Nathan Wright wrote:
For my own use I find it helpful to have the Query subclass for operations that involve a set of rows, and then methods on the mapped class itself are for dealing only with one specific row at a time.
I saw this when looking through Mediacore's source (https://github.com/simplestation/mediacore) but forgot about it totally. This seems to fit well into some things I do. Thanks!
As Mariano was saying, it might be possible save yourself some trouble by using mappers directly instead of DeclarativeBase. You'd likely be able to make your python objects easier to work with because they won't be tied 1-to-1 to the schema that you're building on. This isn't about defining relations so much as composing your mapped classes into their most logical form. A single mapped class can span multiple tables or do practically whatever else you want. YMMV but it's worth a look.
I just like DeclarativeBase's syntax, but you may be right. I will see if some of those advanced properties can be used in my app.
-- Juliusz Gonera http://juliuszgonera.com/ -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.