Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2399

unserializing returns proxyclass name with slashes

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 2.3.3
    • Fix Version/s: None
    • Component/s: ORM
    • Labels:
      None
    • Environment:
      OSX, PHP 5.4.9

      Description

      I serialize a "user"-entity using the following code:

      $user->getBusinessid()->getId(); //this is necessary to load the proxy
      $em->detach($user);
      $_SESSION['user'] = serialize($user);

      When I unserialize said entity with this code:

      $em = self::getEntityManager();
      $user = unserialize($_SESSION['user']);
      return $em->merge($user);

      I get an error like this:
      require(): Failed opening required './core/project/Proxy/_CG_/core/project/Entity/Businesses.php' .

      The thing is that everything after _CG_ should not have any forward slashes. In that case the path would be completely correct.

        Activity

          People

          • Assignee:
            Marco Pivetta
            Reporter:
            Quintenvk
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: