[DDC-3414] Add test for "Joining on a table with inheritance produces badly formed ON clause"

Add a test for a bug report. The test is only simple with no assertions, since the SQL generated by Doctrine is invalid and generates an exception in SQLite.