So I'm playing around with DataMapper trying to learn it, mainly
because we have some complex Oracle databases at my work, and the bind
variable support in DM makes a big performance difference vs the
cursor-similar approach of AR.

One thing we do alot is create DB views.  Currently it's nice because
AR will just take an arbitrary columns you give it and turn them into
attributes of the appropriate type.  For example, we might do
something like use a DB-level aggregation function:

find_by_sql("select high_score, rank(over (order by avg_score desc))
as rank from scores")

And we'll get an AR object where we can say

score.rank

And get the rank from the query.

In DataMapper, though, I get:

NoMethodError - undefined method `rank' for #Score:0x1239e10

I've tried to dig thru the docs for delegated properties/etc, but
can't seem to find the magic incantation in DM.  How would I achieve
this in DM?

Thanks,
Nate
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" 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/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to