Finding broken references

Hey Dave, hope you are talking about single-refs, because I never work with multi’s.
For single refs, “broken” could mean:

  1. the ref field is empty
  2. the ref field is not empty, but it point to a non-existing entry in another table

Solutions:
ad 1) just query the collection, iterate over every entry and check for !refFieldName
ad 2) try a query using an .include on the ref and, again, see if every row has some kind of field from referenced table that you would expect to be included in the query

Does that make sense?