fixes serializeHasMany relationshipType

there is a typo in the JSONSerializer serializeHasMany that prevents hasMany relations from getting serialized.