Thanks for clarification, Marco. :)


On Sat, Aug 2, 2014 at 8:05 PM, Marco Pivetta <[email protected]> wrote:

> There is no performance difference between using Annotations/YAML/XML or
> plain PHP mappings, since mappings are cached anyway.
>
> Marco Pivetta
>
> http://twitter.com/Ocramius
>
> http://ocramius.github.com/
>
>
> On 2 August 2014 17:22, Nima Sadjadi <[email protected]> wrote:
>
>>
>> I gave php OneToMany, ManyToOne, OneToOne and inheritance before.
>> Here is php ManyToMany template if someone is interested in php mappings,
>> I hope a guru will consider to add these all in documentation.
>>
>> Annotation/XML/Yaml needs to be converted into php by doctrine to be
>> executed so I guess these php mappings will be slightly faster, Marco or a
>> guru will correct me if I am wrong.
>>
>>
>> $metadata->mapManyToMany(array( 'fieldName' => '',
>>                                 'targetEntity' => '',
>>                                 'cascade' => array( 0 => 'remove', 1 =>
>> 'persist', 3 => 'merge', ),
>>                                 'joinTable' => array( 'name' =>
>> 'blah1_to_blah2',
>>                                                       'schema' => NULL,
>>                                                       'joinColumns' =>
>> array( 0 => array( 'name' => 'blah1_id',
>>
>> 'referencedColumnName' => 'id',
>>
>> 'nullable' => true,
>>
>> 'onDelete' => 'cascade',
>>
>> 'columnDefinition' => NULL,
>>
>> ), ),
>>
>> 'inverseJoinColumns' => array( 0 => array( 'name' => 'blah2_id',
>>
>> 'referencedColumnName' => 'id',
>>
>> 'nullable' => true,
>>
>> 'onDelete' => 'cascade',
>>
>> 'columnDefinition' => NULL,
>>
>> ), ),
>>                                                        )
>>                           ));
>>
>> --
>> 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.
>

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