Skip to content

Commit

Permalink
Merge pull request #7 from curiosity26/develop
Browse files Browse the repository at this point in the history
Fix issue with ancestors table mapping
  • Loading branch information
curiosity26 authored Nov 28, 2018
2 parents db7d457 + 6e05b14 commit d2d8956
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 30 deletions.
21 changes: 0 additions & 21 deletions Entity/ObjectIdentity.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class ObjectIdentity
{
private $id;
private $parentObjectIdentity;
private $parent;
private $ancestor;
private $class;
private $objectIdentifier;
Expand Down Expand Up @@ -98,26 +97,6 @@ public function setEntriesInheriting($entriesInheriting)
$this->entriesInheriting = $entriesInheriting;
}

/**
* @return mixed
*/
public function getParent()
{
return $this->parent;
}

/**
* @param mixed $parent
*
* @return ObjectIdentity
*/
public function setParent(ObjectIdentity $parent)
{
$this->parent = $parent;

return $this;
}

/**
* @return mixed
*/
Expand Down
3 changes: 2 additions & 1 deletion Resources/config/doctrine/AclClass.orm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ Curiosity26\AclHelperBundle\Entity\AclClass:
classType:
name: class_type
type: string
length: 200
length: 200
unique: true
3 changes: 3 additions & 0 deletions Resources/config/doctrine/Entry.orm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@ Curiosity26\AclHelperBundle\Entity\Entry:
securityIdentity:
targetEntity: 'Curiosity26\AclHelperBundle\Entity\SecurityIdentity'
cascade: ["persist"]
uniqueConstraints:
entry_idx:
columns: [class_id, object_identity_id, field_name, ace_order]
12 changes: 5 additions & 7 deletions Resources/config/doctrine/ObjectIdentity.orm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,16 @@ Curiosity26\AclHelperBundle\Entity\ObjectIdentity:
targetEntity: 'Curiosity26\AclHelperBundle\Entity\AclClass'
cascade: ["persist"]
manyToMany:
parent:
targetEntity: 'Curiosity26\AclHelperBundle\Entity\ObjectIdentity'
mappedBy: ancestor
ancestor:
targetEntity: 'Curiosity26\AclHelperBundle\Entity\ObjectIdentity'
inversedBy: parentObjectIdentity
joinTable:
name: acl_object_identity_ancestors
inversedJoinColumns:
joinColumns:
object_identity_id:
referencedColumnName: id
joinColumns:
inverseJoinColumns:
ancestor_id:
referencedColumnName: id

uniqueConstraints:
class_identifier_idx:
columns: [class_id, object_identifier]
5 changes: 4 additions & 1 deletion Resources/config/doctrine/SecurityIdentity.orm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ Curiosity26\AclHelperBundle\Entity\SecurityIdentity:
type: string
length: 200
username:
type: boolean
type: boolean
uniqueConstraints:
identifier_username_idx:
columns: [identifier, username]

0 comments on commit d2d8956

Please sign in to comment.