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.

Reply via email to