use pathForType when serializing records