You must use InnoDB tables (and have the foreign keys set) for Middlegen to pick up the relationships. If you already have MyISAM tables, see... http://www.mysql.com/doc/en/Converting_tables_to_InnoDB.html I was able to pick up relationships using mysql-connector-java-3.0.10-stable-bin.jar.