Details
Description
Everything works fine when I use the @Table annotation like this: @Table(name="`user`"). But when the user table is in the user schema and I try to use the annotion in this way: @Table(name="`user`.`user`") — everything falls apart.
A quick look into the code showed that it checks if the table name starts with `, and if it does, it sets the quoted parameter to true and removes the ` characters on the both sides. So, if I quote the both words like @Table(name="`user`.`user`"), the table name becomes "user`.`user" and it, of course, fails. If I quote it just like @Table(name="`user.user`"), the table name becomes "user.user", which fails too.
If Doctrine allows to escape the reserved words, it should take into account this kind of usage as well.
By now, it's currently impossible to do cross database joins in an easy way.
We have planned it through the schema support in @Table.
I'll be working on this support for 2.2, but until there, my only recommendation is to not use a keyword as a table name.
Cheers,