[DB] Private properties cause a lot of errors when serializing objects

http://blog.geertvd.be/2011/09/25/symfony2-id-returned-as-member-variable-from-__sleep-but-does-not-exist/
Merge branch 'im-d2-sleep'