I asked this question awhile back, but any support planned for table
returning functions, or stored procedures?
I’m envisioning basically a mutable model class where you have 1 or more
instance variables defined (with default values) that are used in the
SQL queries as input parameters. When you instantiate the class you can
specifically define these parameters or use the defaults, when you
access the class directly it just uses the defaults.
Since the columns returned should be the same (unless its an olap type
query which wouldn’t be supported) I think this would generally be
compatible with active record.
This would really foster corporate adoption. Personally, a lot of our
logic is in the stored procedures. Yes, one can argue that this is not
a proper tiered design, but there simply is some logic BETTER done on
the SQL server. Plus, you get the benefits of being able to optimize
complex queries and use temp tables.