Hi Jon,

Thanks for the quick reply: I've been trying to write the tests
case... However, by looking into the code I have when I checkout a
separate Doctrine instance, I've found that version 1.2 seems to
correct this problem, since the code in the createQuery function is
"return Doctrine_Query::create($this->_conn, $class)..." and therefore
uses the instantiated connection.
It might be that we simply need to update the Doctrine version of our
Symfony framework.

Tell me if you still need the test case anyway.
Olivier.

On Jul 6, 6:49 pm, Jonathan Wage <jonw...@gmail.com> wrote:
> Hi,
>
> I am working on the issue. Can you try and create a Doctrine test case that
> demonstrates the problem? So we can test patches against it.
>
> - Jon
>
>
>
>
>
> On Tue, Jul 6, 2010 at 10:04 AM, Olivier <olivier.cha...@gmail.com> wrote:
> > Hello,
>
> > We are using a Symfony/Doctrine setup with multiple databases... We've
> > ran into a few issues concerning connection binding. There is also an
> > issue with the createQuery function in the Doctrine_Table object.
>
> > This function calls Doctrine_Query::create(null, $class), where "null"
> > is the "connection" parameter. Therefore, whatever the binding or even
> > the connection upon which the "getTable" function was called, the
> > query is constructed with the "current connection" (using
> > getCurrentConnection), which is often the wrong one. This causes
> > issues for instance when you use a cache: the cache hash is computed
> > using the 'dsn' string for the connection, which is always the one for
> > the current connection, even if the query is later called against on
> > the right database.
>
> > One patch could be to use Doctrine_Query::create($this-
> > >getConnection(), $class) in the createQuery() function, but we are
> > not sure this does not have side effect.
>
> > Another possibility would be to define a specific "table" from which
> > our table model would inherit, but this would make binding useless
> > for models...
>
> > Anyone can share ideas on this?
>
> > Thanks,
> > Olivier.
>
> > --
> > 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<symfony-users%2bunsubscr...@goog 
> > legroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en
>
> --
> Jonathan H. Wagehttp://www.twitter.com/jwage

-- 
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