Mmm. Thanks for the answer. I'll make some clarifications. DataMapper does not have eager loading for aggregate association. It doesn't have aggregate association at all (that I know of, I've only used it briefly). I was simply referring to their concept of "strategic eager loading" (http://datamapper.org/doku.php? id=why_datamapper).
Using DataMapper I actually did a raw SQL query to get all my stats, and used the result hash separately from my model. I could do exactly the same with Sequel I'm sure. My application has a lot of reporting, across many tables, and for several models. The need for different kind of reports also change often enough that I don't want to bother getting into "cache" columns for these values. What I'm looking at I guess, is a way to get "virtual attributes" loaded along real ones when getting a dataset. Something like what eager does. I'd like to write my own "eager" so that whenever I get a bunch of Project objects, I then launch my own queries (even raw sql on unrelated tables if that makes sense), and "add" the virtual attributes to my objects. It should make it easy to add new virtual attributes, or change them. I'll look more into the code of the eager method to understand how it does it. I'm not an expert on Ruby ORM, but I must admit I really like Sequel so far. Out of curiosity, I'm wrote the same application in Rails with ActiveRecord, DataMapper and now Sequel. Sequel is really the most powerful of the three, and also the more consistent in terms of syntax. I'm really surprised it's not as talked about as the two others. I'm really looking forward to its future. BTW, would you have links to articles or documentation explaining how to write plugins for Sequel? Otherwise I'll just look at existing plugins. Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sequel-talk" 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/sequel-talk?hl=en -~----------~----~----~----~------~----~------~--~---
