I am working with Community users and I need to query both their User and Contact details at the same time.
When I am performing a relationship query like
[Select Id, Email, ContactId, Contact.FirstName, Contact.LastName From User where...]
I am getting the correct field values from User, but the fields from Contact have the value
If I query these objects separately, I am able to see the values from the Contact object's fields. I am system admin and I have access on all fields specified in the SOQL query. The OWD for Contact is Controlled by Parent and for User is private.
I could do the queries separately in my code but I wonder what is the cause why the relationship query is giving such a result?