Has anybody tried mapping database views in oracle using ActiveRecord? Please can I get some sample code for that?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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.