Skip to content

Commit

Permalink
Added namedQueries as optional during serialization of ClassMetadata.
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermeblanco committed Mar 14, 2011
1 parent 925f1c2 commit 180078d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Doctrine/ORM/Mapping/ClassMetadata.php
Expand Up @@ -275,7 +275,6 @@ public function __sleep()
{
// This metadata is always serialized/cached.
$serialized = array(
'namedQueries',
'associationMappings',
'columnNames', //TODO: Not really needed. Can use fieldMappings[$fieldName]['columnName']
'fieldMappings',
Expand Down Expand Up @@ -331,6 +330,10 @@ public function __sleep()
$serialized[] = 'lifecycleCallbacks';
}

if ($this->namedQueries) {
$serialized[] = 'namedQueries';
}

return $serialized;
}

Expand Down

0 comments on commit 180078d

Please sign in to comment.