Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/dev/1.6' into 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
rgrebenchuk committed Mar 20, 2015
2 parents 0b6ab1f + 3986a8a commit eef2ea2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
3 changes: 3 additions & 0 deletions UPGRADE-1.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ UPGRADE FROM 1.5 to 1.6
####OroUserBundle:
- Added `oro_user_organization_acl_select` form type which selects users by assigned organizations, not by owned organization.
- Added `oro_user_organization_acl_multiselect` multi select form type which selects users by assigned organizations, not by owned organization.

####Composer dependencies:
- Removed abandoned package `guzzle/http` in favor of `guzzle/guzzle`.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"a2lix/translation-form-bundle": "1.2",
"mtdowling/cron-expression": "1.0.*",
"jdare/clank-bundle": "0.1.*",
"guzzle/http": "3.7.*",
"guzzle/guzzle": "3.7.*",
"lexik/maintenance-bundle": "v1.0.3",
"sylius/flow-bundle": "0.6.*",
"composer/composer": "1.0.0-alpha8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,19 +87,21 @@ public function onClear(OnClearEventArgs $event)
*/
protected function refreshEntity($entity)
{
if ($entity instanceof Proxy && !$entity->__isInitialized()) {
$entity->__load();
}

if (!$this->doctrineHelper->getSingleEntityIdentifier($entity)) {
return null;
}

$entityClass = ClassUtils::getClass($entity);
$entityId = $this->doctrineHelper->getSingleEntityIdentifier($entity);

/** @var EntityManager $entityManager */
$entityManager = $this->registry->getManagerForClass($entityClass);

if (!$entityId) {
return null;
}

if ($entity instanceof Proxy && !$entity->__isInitialized()) {
// We cannot use $entity->__load(); because of bug BAP-7851
return $entityManager->find($entityClass, $entityId);
}

return $entityManager->merge($entity);
}
}

0 comments on commit eef2ea2

Please sign in to comment.