I had the very same problem with an Oracle database. When I specified the foreign key relationship in the Oracle DB directly, everything worked out. Can you try that in your MySQL schema?