views:

67

answers:

0

There should be a way to map a DataMapper model against an arbitrary select (please see an example: http://www.sqlalchemy.org/docs/05/mappers.html#mapping-a-class-against-arbitrary-selects) So far I have found a solution (or a starting point to reach it) that looks like the following:

find_by_sql(an_sql_select, :properties=>some_properties_set)

Is this a right way?