porting cookbook entry from symfony-cmf-docs to doctrine doc. fix #32