Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-561

Metadata caching broken due to incomplete __sleep functions

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0-BETA2
    • Component/s: Mapping Drivers
    • Security Level: All
    • Labels:
      None

      Description

      When using a persistent Metadata cache, the serialized ClassMetadata objects are not complete.

      This leads to very strange behavior since not all Metadata is loaded in the next request (which uses cached Metadata). The problem is that the __sleep methods of Doctrine\ORM\Mapping\AssociationMapping and Doctrine\ORM\Mapping\ClassMetadata are note complete (missing "namespace", "fetchMode" properties).

        Activity

        Hide
        Roman S. Borschel added a comment -

        And you can just use HEAD and not the tag, of course

        Show
        Roman S. Borschel added a comment - And you can just use HEAD and not the tag, of course
        Hide
        Roman S. Borschel added a comment -

        Hehe, no its fine. You can easily patch it manually if needed and beta2 is only a few weeks away.

        Show
        Roman S. Borschel added a comment - Hehe, no its fine. You can easily patch it manually if needed and beta2 is only a few weeks away.
        Hide
        Benjamin Eberlei added a comment -

        Should we re-release Beta1? This is pretty serious and might annoy people

        Show
        Benjamin Eberlei added a comment - Should we re-release Beta1? This is pretty serious and might annoy people
        Show
        Roman S. Borschel added a comment - Fixed in http://github.com/doctrine/doctrine2/commit/db2be55e27c87fa513073b2bf44456f1d1423582 . Thanks for your help.
        Hide
        Roman S. Borschel added a comment -

        Ouch, bad oversight. Sorry for that. We do actually have tests for serializing and unserializing the metadata, obviously not enough... will fix it asap.

        Show
        Roman S. Borschel added a comment - Ouch, bad oversight. Sorry for that. We do actually have tests for serializing and unserializing the metadata, obviously not enough... will fix it asap.
        Hide
        Nico Kaiser added a comment -

        This patch fixes the issue for AssociationMapping and ClassMetadata. I'm not sure if there are more properties missing...

        Show
        Nico Kaiser added a comment - This patch fixes the issue for AssociationMapping and ClassMetadata. I'm not sure if there are more properties missing...

          People

          • Assignee:
            Roman S. Borschel
            Reporter:
            Nico Kaiser
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: