So I had this issue and the error was extremely misleading. In my case, the error was thrown in the middle of a database transaction. When I commented out the transaction, I got the real error message and was able to fix it, but it was completely unrelated to the relationship between the two models the validation error gave me.