Has anybody tried mapping database views in oracle using ActiveRecord? Please can I get some sample code for that?
No code necessary: just use the view name instead of the table in your [ActiveRecord]
attribute:
[ActiveRecord("MyView")]
public class Document {...}
Be aware that SchemaExport will treat your view as a table, here's how to fix that.
来源:https://stackoverflow.com/questions/2048483/how-to-map-a-database-view-using-activerecord