Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Critical
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:Doctrine 1.2, Symfony 1.4.6, MySQL, Postgresql
Description
Actually, I've a dead simple schema.yml, with two tables:
T_Media:
actAs:
Timestampable: ~
columns:
media_id:
name: string(25)
J_Acl:
columns:
media_id: integer
relations:
Media:
I have some fixtures:
T_Media:
m1:
name: foobar
J_Acl:
a1:
Media: m1
And then, the DQL query I want to execute:
"From T_Media m INNER JOIN m.J_Acl order by m.created_at limit 1"
But if I run this query, for instance in CLI, I got an error:
./symfony doctrine:dql "From T_Media m INNER JOIN m.J_Acl order by m.created_at limit 1"
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'test_noel.t2__media' doesn't exist.
Failing Query: "SELECT DISTINCT t2.media_id FROM t2_media t2 INNER JOIN j2_acl j2 ON t2.media_id = j2.media_id ORDER BY t2.created_at LIMIT 1"
Notes:
- the query works if I do not apply the limit clause.
- if I remove the underscore from the model, or if I set manually the tableName to remove the double underscore, it works