DDC-561: Metadata caching broken due to incomplete __sleep functions #695

Closed
opened 2026-01-22 12:47:05 +01:00 by admin · 8 comments
Owner

Originally created by @doctrinebot on GitHub (Apr 30, 2010).

Jira issue originally created by user nicokaiser:

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).

Originally created by @doctrinebot on GitHub (Apr 30, 2010). Jira issue originally created by user nicokaiser: 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).
admin added the Bug label 2026-01-22 12:47:05 +01:00
admin closed this issue 2026-01-22 12:47:05 +01:00
Author
Owner

@doctrinebot commented on GitHub (Apr 30, 2010):

Comment created by nicokaiser:

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

@doctrinebot commented on GitHub (Apr 30, 2010): Comment created by nicokaiser: This patch fixes the issue for AssociationMapping and ClassMetadata. I'm not sure if there are more properties missing...
Author
Owner

@doctrinebot commented on GitHub (Apr 30, 2010):

Comment created by romanb:

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

@doctrinebot commented on GitHub (Apr 30, 2010): Comment created by romanb: Ouch, bad oversight. Sorry for that. We do actually have tests for serializing and unserializing the metadata, obviously not enough... will fix it asap.
Author
Owner

@doctrinebot commented on GitHub (Apr 30, 2010):

Comment created by romanb:

Fixed in db2be55e27 .

Thanks for your help.

@doctrinebot commented on GitHub (Apr 30, 2010): Comment created by romanb: Fixed in http://github.com/doctrine/doctrine2/commit/db2be55e27c87fa513073b2bf44456f1d1423582 . Thanks for your help.
Author
Owner

@doctrinebot commented on GitHub (Apr 30, 2010):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Apr 30, 2010): Issue was closed with resolution "Fixed"
Author
Owner

@doctrinebot commented on GitHub (Apr 30, 2010):

Comment created by @beberlei:

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

@doctrinebot commented on GitHub (Apr 30, 2010): Comment created by @beberlei: Should we re-release Beta1? This is pretty serious and might annoy people :-)
Author
Owner

@doctrinebot commented on GitHub (Apr 30, 2010):

Comment created by romanb:

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

@doctrinebot commented on GitHub (Apr 30, 2010): Comment created by romanb: Hehe, no its fine. You can easily patch it manually if needed and beta2 is only a few weeks away.
Author
Owner

@doctrinebot commented on GitHub (Apr 30, 2010):

Comment created by romanb:

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

@doctrinebot commented on GitHub (Apr 30, 2010): Comment created by romanb: And you can just use HEAD and not the tag, of course :)
Author
Owner

@doctrinebot commented on GitHub (Dec 13, 2015):

Imported 1 attachments from Jira into https://gist.github.com/75feb7482ea76f211d27

@doctrinebot commented on GitHub (Dec 13, 2015): Imported 1 attachments from Jira into https://gist.github.com/75feb7482ea76f211d27 - [10588_ddc-561.patch](https://gist.github.com/75feb7482ea76f211d27#file-10588_ddc-561-patch)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#695