Raise Error if a primary key is necessary to use an association, but the model doesn't have a primary key

This is better than failing later with a NoMethodError or worse,
appearing to work but generating bogus queries.