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

9 lines
342 B
PHP
Raw Normal View History

2007-04-14 01:49:11 +04:00
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.
2007-04-14 01:49:11 +04:00
<code type="php">
$string = serialize($user);
$user = unserialize($string);
</code>