1
0
mirror of synced 2024-12-15 15:46:02 +03:00
doctrine2/manual/docs/Working with objects - Component overview - Record - Serializing.php

9 lines
349 B
PHP

Sometimes you may want to serialize your record objects (possibly for caching purposes). Records can be serialized,
but remember: Doctrine cleans all relations, before doing this. So remember to persist your objects into database before serializing them.
<code type="php">
$string = serialize($user);
$user = unserialize($string);
</code>