Fix serialize models with subset of attributes
Merge pull request #3683 from pcreux/fix-serialize-with-only

Fix serialize models with subset of attributes