Hello Dominique,

Please consider that this is an English-based mailing list :-)

As for the question, the ORM does not support INSERT in DQL (by design).

The correct way to execute an INSERT is to:

 - create a new object
 - persist the object
 - flush the entity manager


Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/

On 27 October 2015 at 10:35, Dominique SAUVIGNON <[email protected]>
wrote:

> bonjour,
>
> Sauf erreur de ma part,
> je viens de voir sur le site de doctrine, que DQL ne prend pas en charge
> l'insert...
>
> Le mercredi 22 juillet 2009 01:00:59 UTC+2, Mark E. Haase a écrit :
>>
>> Is there a DQL equivalent for this syntax?
>>
>> INSERT INTO `notifications`
>> SELECT
>>     null,
>>     event_id,
>>     description
>> FROM `events` e;
>>
>> This is a really nice, fast syntax for inserting a bunch of rows. i
>> can't find a DQL alternative.
>>
>> If I create a Doctrine_Collection and then save() it, does Doctrine
>> issue separate queries for each insert, or does it insert all values
>> at once?
>
> --
> You received this message because you are subscribed to the Google Groups
> "doctrine-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/doctrine-user.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to