mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-132: Subclass' columns missing from cached ClassMetadata::$resultColumnNames #165
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Nov 9, 2009).
Jira issue originally created by user reinier.kip:
I have a Customer with class table inheritance mapping and some fields, and a subclass called SuperCustomer with two fields: bool
isSuperand stringextra.I found that when replacing the usual ArrayCache with a MemcacheCache, everything works fine on the first request, but notices occur on subsequent requests:
Notice: Undefined index: isSuper in X:...\Doctrine\ORM\Persisters\StandardEntityPersister.php on line 577
Notice: Undefined index: extra in X:...\Doctrine\ORM\Persisters\StandardEntityPersister.php on line 577
Inspection of ClassMetadata::$resultColumnNames on line 569 showed that the two fields
isSuperandextrawere (the only things) missing. The resulting object'sisSuperandextraproperties were empty.I have yet to find the cause of this, but maybe you have an idea.
@doctrinebot commented on GitHub (Nov 9, 2009):
Comment created by romanb:
This is indeed strange. My first guess was that the resultColumnNames get lost during serialization but the ClassMetadata#**sleep implementation seems to be correct in so far as it returns the resultColumnNames field as part of the fields to serialize.
Let me know as soon as you have more information.
Btw. Which metadata driver are you using? Annotations?
@doctrinebot commented on GitHub (Nov 10, 2009):
Comment created by reinier.kip:
I'll try to find where it goes wrong and let you know.
@doctrinebot commented on GitHub (Nov 10, 2009):
Comment created by reinier.kip:
First request:
Second request:
Thought: the Customer's metadata is somehow changed after caching to cope with Customer's subclasses as well, but these changes are not in the cache. I don't have enough knowledge of Doctrine's internals, but you probably have a pretty good idea where this could happen.
@doctrinebot commented on GitHub (Nov 10, 2009):
Comment created by romanb:
Thanks for your detailed information. I think I know what the issue is now. May be non-trivial to fix. I will try to look into it as soon as I got some free time.
@doctrinebot commented on GitHub (Nov 11, 2009):
Comment created by @jwage:
Here is a patch which fixes the issue but through doing this roman and I realized another issue.
@doctrinebot commented on GitHub (Nov 11, 2009):
Comment created by romanb:
Scheduled for ALPHA4 as this may need some restructuring.
@doctrinebot commented on GitHub (Dec 9, 2009):
Comment created by romanb:
This should be fixed now in trunk.
@doctrinebot commented on GitHub (Dec 9, 2009):
Issue was closed with resolution "Fixed"
@doctrinebot commented on GitHub (Dec 13, 2015):
Imported 1 attachments from Jira into https://gist.github.com/bb26bf1d944b4e23b1d6