According to documentation
ObjectPermissions represents only enabled object permissions for parent permission set. Permission set license determines which objects are associated with parent permission set but after digging the web I can't find out any possible way to get that information. Is it possible to get all permissionable objects associated with Permission Set?
Following Query returns only enabled permissions (at least
PermissionsRead = true).
SELECT SObjectType, PermissionsRead, PermissionsCreate, PermissionsEdit, PermissionsDelete, PermissionsViewAllRecords, PermissionsModifyAllRecords FROM ObjectPermissions WHERE Parent.Profile.Name = 'Read Only'
Records like below isn't stored to avoid redundancy and it is totally understandable.
I need to find that missing records or at least SObjectType names somehow. I hope it is clear enough.
I stumbled upon an article from Bill Appleton (CTO at Metazoa) about The Sparse Profile Problem and I wonder how they determined which of the negative values needs to be added by hand.