Skip to content

Loading…

DDC-49: Incomplete MySQL Query Generator (MySQL Syntax error) #4994

Closed
doctrinebot opened this Issue · 3 comments

1 participant

@doctrinebot

Jira issue originally created by user purnama:

i checkout the HEAD version. and try to write this DQL

$query = utilities\DataAccess::getEntityManager()->createQuery("SELECT
p, t FROM ".models\Phrase::CLASS_NAME." p join p.type t WHERE p.phrase
= '$phrase'");

i commented out the $config->setAllowPartialObjects(false);

and have PDO error that my MySQL statement sytax is invalid.

i check the Query that the Doctrine create and its like this :
SELECT p0.phrase_id AS phrase_id0, p0_.phrase_name AS phrasename1,
p1.phrase_type_id AS phrase_type_id2, p1_.phrase_typename AS
phrasetype_name3, p1_.phrase_typeabbreviation AS
phrasetype_abbreviation4 FROM phrase p0_ INNER JOIN phrase_type p1
ON p0.phrase_type_id = p1_. WHERE p0_.phrasename = 'abu'

as you can si at the ON statement it writes p0.phrase_type_id = p1.

the p1_. is not completed. i think my DocAnnotation is OK, because i
look at the Doctrine Tests Models that test the OneToMany Function
(the one with the ECommerce models, product and features). I have
followed all the doc annotation writes there.

@doctrinebot

Comment created by romanb:

Should be fixed now in HEAD.

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot doctrinebot added this to the 2.0-ALPHA3 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.