0
I created a View in the database and now I need to use it in the system, but I can not use it, because the Doctrine à recognizes as a table, the following error appears:
Type: Doctrine\DBAL\Driver\Mysqli\MysqliException
Message: Table 'empresa.view_usuario' doesn't exist
File: /var/www/projeto/sistema/third_party/composer/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php
Line: 94
I took the following steps:
- I created the view in the database
- I created the Entity as Readonly
- I created the DAO and nothing worked always returns this error
Is there any way to use views on Doctrine ?
The mistake is saying that in Database
empresa
there is no tableview_usuario
– NoobSaibot
Yes, but this is not a table is a view, I looked for some examples on the internet and and tried to do the entity there, only that always gives this error, in case I wouldn’t need the entity just need to query the view and take the data.
– Lucas Lima
But the table exists ? If it doesn’t exist it won’t work.
– NoobSaibot
There is no view, there is a view. But there is no way I can query this view using Doctrine ?
– Lucas Lima