Skip to content

Commit d2d8956

Browse files
authored
Merge pull request #7 from curiosity26/develop
Fix issue with ancestors table mapping
2 parents db7d457 + 6e05b14 commit d2d8956

File tree

5 files changed

+14
-30
lines changed

5 files changed

+14
-30
lines changed

Entity/ObjectIdentity.php

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ class ObjectIdentity
1212
{
1313
private $id;
1414
private $parentObjectIdentity;
15-
private $parent;
1615
private $ancestor;
1716
private $class;
1817
private $objectIdentifier;
@@ -98,26 +97,6 @@ public function setEntriesInheriting($entriesInheriting)
9897
$this->entriesInheriting = $entriesInheriting;
9998
}
10099

101-
/**
102-
* @return mixed
103-
*/
104-
public function getParent()
105-
{
106-
return $this->parent;
107-
}
108-
109-
/**
110-
* @param mixed $parent
111-
*
112-
* @return ObjectIdentity
113-
*/
114-
public function setParent(ObjectIdentity $parent)
115-
{
116-
$this->parent = $parent;
117-
118-
return $this;
119-
}
120-
121100
/**
122101
* @return mixed
123102
*/

Resources/config/doctrine/AclClass.orm.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ Curiosity26\AclHelperBundle\Entity\AclClass:
1010
classType:
1111
name: class_type
1212
type: string
13-
length: 200
13+
length: 200
14+
unique: true

Resources/config/doctrine/Entry.orm.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,6 @@ Curiosity26\AclHelperBundle\Entity\Entry:
4141
securityIdentity:
4242
targetEntity: 'Curiosity26\AclHelperBundle\Entity\SecurityIdentity'
4343
cascade: ["persist"]
44+
uniqueConstraints:
45+
entry_idx:
46+
columns: [class_id, object_identity_id, field_name, ace_order]

Resources/config/doctrine/ObjectIdentity.orm.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,16 @@ Curiosity26\AclHelperBundle\Entity\ObjectIdentity:
2323
targetEntity: 'Curiosity26\AclHelperBundle\Entity\AclClass'
2424
cascade: ["persist"]
2525
manyToMany:
26-
parent:
27-
targetEntity: 'Curiosity26\AclHelperBundle\Entity\ObjectIdentity'
28-
mappedBy: ancestor
2926
ancestor:
3027
targetEntity: 'Curiosity26\AclHelperBundle\Entity\ObjectIdentity'
31-
inversedBy: parentObjectIdentity
3228
joinTable:
3329
name: acl_object_identity_ancestors
34-
inversedJoinColumns:
30+
joinColumns:
3531
object_identity_id:
3632
referencedColumnName: id
37-
joinColumns:
33+
inverseJoinColumns:
3834
ancestor_id:
3935
referencedColumnName: id
40-
36+
uniqueConstraints:
37+
class_identifier_idx:
38+
columns: [class_id, object_identifier]

Resources/config/doctrine/SecurityIdentity.orm.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@ Curiosity26\AclHelperBundle\Entity\SecurityIdentity:
1111
type: string
1212
length: 200
1313
username:
14-
type: boolean
14+
type: boolean
15+
uniqueConstraints:
16+
identifier_username_idx:
17+
columns: [identifier, username]

0 commit comments

Comments
 (0)