Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
[ORM] How to use view tables
Is it possible to use table views in ORM? I tried it by using $_table_name but it doesn't work.
Yes, you can.
You define your views in the model:
protected $_views = array(
'viewname' => array(
Then in the query you use
Model_This::find('all', array('use_view' => 'viewname));
Note that you can only SELECT from a view, INSERT/UPDATE are not supported.
Does this also accept relationships?
Add a Comment
It looks like you're new here. If you want to get involved, click one of these buttons!
Apply for Membership
↳ Job Board
↳ Installation & Setup
↳ Tips and Tutorials
↳ Code share
In this Discussion