Throw an error if AssociatedModel is not used in relations