If you aren't wanting to use Doctrine at all, its possible, but never put your sql in the controller. The idea behind the MVC Pattern is to separate the "business" from the control, and of course, the display from both of those. Put your sql in your model and put your model in the Entity folder. (Document folder for NoSQL). Even if you don't use Doctrine in the end, the Entity generating tools can save you some mundane coding.

But take some time to get to know Doctrine2, you may find that you are not sacrificing any execution time and you will probably save development time.

Richard

On 09/08/2010 04:47 PM, Alexandre Salomé wrote:
It's not a bad idea, and can be justified in some cases.

Doctrine was separated in 2 parts in the version 2 : ORM and DBAL.

ORM provides mapping Object - Database.
DBAL provides abstraction for SQL querying.

Have a look at Doctrine project website.

The service is named "doctrine.dbal" in Symfony2.

Enjoy ;)

2010/9/8 Stephane Duguay <s...@binarez.com <mailto:s...@binarez.com>>

    Hi,

    I want to use 2 MySQL databases with my Symfony2 project. I want
    to have my code stay Doctrine-free or Propel-free because I'm ok
    at manually building SQL queries and I want minimal DB overhead
    (major scaling requirements).

    Is this a bad idea? It seems like I can just write the controllers
    to deal with SQL directly and I would be done!

    Thank you and have a good day!
-- # Stéphane -- If you want to report a vulnerability issue on symfony, please
    send it to security at symfony-project.com
    <http://symfony-project.com>

    You received this message because you are subscribed to the Google
    Groups "symfony users" group.
    To post to this group, send email to
    symfony-users@googlegroups.com <mailto:symfony-users@googlegroups.com>
    To unsubscribe from this group, send email to
    symfony-users+unsubscr...@googlegroups.com
    <mailto:symfony-users%2bunsubscr...@googlegroups.com>
    For more options, visit this group at
    http://groups.google.com/group/symfony-users?hl=en




--
Alexandre Salomé
http://alexandre-salome.fr
--
If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to