Update GenericDeserializationVisitor.php

Fixes a deserialization problem with references(e.g. Many-To-One entities in Doctrine) if you provide just the ID instead the full object.