Return all fields when resource schema is empty.

When resource schema is empty all document fields are returned. Previously, it
would only return automatic fields (which was a bug).