I have created a view on my system, to access it I create a model?
|
Jun '18 |
6 |
923 |
0 |
YES, I want to create a model from a view in the database. But when you run the command "Phalcon model vistakardex" you return me an error message that the table does not exist
hi,
are you meaning a mysql view ?
Yes I already know that. I think models of a table but when I do so with a view error that view does not exist. What is the correct procedure for access this view? A model?
and a controller...(take a look at the MVC concepts first...Models handle datas representation (from database or object), controller process datas and prepare the presentation, view display that)
That's strange. I know that this feature was working (model generation from a postgres db view with devtools) with phalcon.
I will try with new 3.0.0 ....
YES, I want to create a model from a view in the database. But when you run the command "Phalcon model vistakardex" you return me an error message that the table does not exist
hi,
are you meaning a mysql view ?
Sorry, I missed the point that you're talking about db view..what say your postgres log? does the connection work fine?
Yes I already know that. I think models of a table but when I do so with a view error that view does not exist. What is the correct procedure for access this view? A model?
and a controller...(take a look at the MVC concepts first...Models handle datas representation (from database or object), controller process datas and prepare the presentation, view display that)
Hi jeiel, did you find any solution? same problem found when I access Oracle view. The following initialize() function declared in model
public function initialize()
{
$this->setConnectionService('dbBznes');
$this->setSchema('POLICY');
$this->setSource("BUSINESS_ALL");
// view name
}
Return error message :
Table 'POLICY'.'BUSINESS_ALL' doesn't exist in database