@@ 38-50 (lines=13) @@ | ||
35 | $entityName = (string) $classMetadata->getName(); |
|
36 | ||
37 | // We dynamically set the user class that was configured in the configuration |
|
38 | if ($entityName == 'Kunstmaan\AdminBundle\Entity\AclChangeset') { |
|
39 | $mapping = array( |
|
40 | 'fieldName' => 'user', |
|
41 | 'targetEntity' => $this->className, |
|
42 | 'joinColumns' => array(array( |
|
43 | 'name' => 'user_id', |
|
44 | 'referencedColumnName' => 'id', |
|
45 | 'unique' => false, |
|
46 | 'nullable' => true, |
|
47 | )), |
|
48 | ); |
|
49 | $classMetadata->mapManyToOne($mapping); |
|
50 | } |
|
51 | ||
52 | // If we overwrite the user entity, we should create a new join table with the groups |
|
53 | if ($entityName == $this->className) { |
@@ 38-50 (lines=13) @@ | ||
35 | $entityName = (string) $classMetadata->getName(); |
|
36 | ||
37 | // We dynamically set the user class that was configured in the configuration |
|
38 | if ($entityName == 'Kunstmaan\NodeBundle\Entity\QueuedNodeTranslationAction') { |
|
39 | $mapping = array( |
|
40 | 'fieldName' => 'user', |
|
41 | 'targetEntity' => $this->className, |
|
42 | 'joinColumns' => array(array( |
|
43 | 'name' => 'user_id', |
|
44 | 'referencedColumnName' => 'id', |
|
45 | 'unique' => false, |
|
46 | 'nullable' => true, |
|
47 | )), |
|
48 | ); |
|
49 | $classMetadata->mapManyToOne($mapping); |
|
50 | } |
|
51 | } |
|
52 | } |
|
53 |