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