Issue
I'm doing a simple MVC web app that is supposed to do different queries to a SQL database. I'm using Symfony 4
as a framework, mostly to take advantage of its routing features.
I know I could take advantage from Doctrine but I was wondering: if someone wants to use PDO
instead of Doctrine is it possible to do so and how should it be implemented. Should I make a Database class with PDO that I could pass on to another class?
Solution
Yes, you are not required to use doctrine at all. You can just define your own service with required functionality.
But maybe you could use DBAL which is lower layer used by doctrine to handle creating queries (but doesn't include any ORM functionality).
Answered By - M. Kebza
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.