partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit 8dcaf2e0c8261d8ce4c89019615a1f96638c5155
parent 058a31596763946e5d538bb62e160a62c895dcb6
Author: Felicitus <felicitus@felicitus.org>
Date:   Fri,  6 Nov 2015 18:28:37 +0100

Don't serialize the full tree when retrieving entities

Diffstat:
Mapp/config/config_partkeepr.yml | 8++++----
Msrc/PartKeepr/PartBundle/Entity/PartCategory.php | 2+-
Msrc/PartKeepr/StorageLocationBundle/Entity/StorageLocationCategory.php | 2+-
3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/app/config/config_partkeepr.yml b/app/config/config_partkeepr.yml @@ -448,10 +448,10 @@ services: - method: "initItemOperations" arguments: [ [ "@resource.part_category.item_operation.get", "@resource.part_category.item_operation.put", "@resource.part_category.item_operation.delete", "@resource.part_category.item_operation.move" ] ] - method: "initNormalizationContext" - arguments: [ { groups: [ "default" ] } ] + arguments: [ { groups: [ "default", "tree" ] } ] - method: "initDenormalizationContext" arguments: - - { groups: [ "default" ] } + - { groups: [ "default", "tree" ] } resource.part_distributor: parent: "api.resource" @@ -684,10 +684,10 @@ services: - method: "initItemOperations" arguments: [ [ "@resource.storage_location_category.item_operation.get", "@resource.storage_location_category.item_operation.put", "@resource.storage_location_category.item_operation.delete", "@resource.storage_location_category.item_operation.move" ] ] - method: "initNormalizationContext" - arguments: [ { groups: [ "default" ] } ] + arguments: [ { groups: [ "default", "tree" ] } ] - method: "initDenormalizationContext" arguments: - - { groups: [ "default" ] } + - { groups: [ "default", "tree" ] } resource.storage_location_image.item_operation.get: class: "Dunglas\ApiBundle\Api\Operation\Operation" diff --git a/src/PartKeepr/PartBundle/Entity/PartCategory.php b/src/PartKeepr/PartBundle/Entity/PartCategory.php @@ -29,7 +29,7 @@ class PartCategory extends AbstractCategory /** * @ORM\OneToMany(targetEntity="PartCategory", mappedBy="parent") * @ORM\OrderBy({"lft" = "ASC"}) - * @Groups({"default"}) + * @Groups({"tree"}) */ protected $children; diff --git a/src/PartKeepr/StorageLocationBundle/Entity/StorageLocationCategory.php b/src/PartKeepr/StorageLocationBundle/Entity/StorageLocationCategory.php @@ -27,7 +27,7 @@ class StorageLocationCategory extends AbstractCategory /** * @ORM\OneToMany(targetEntity="StorageLocationCategory", mappedBy="parent") * @ORM\OrderBy({"lft" = "ASC"}) - * @Groups({"default"}) + * @Groups({"tree"}) */ protected $children;