[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.
Should probably assert on the generated SQL instead: the test as it stands has no assertions (yes, I know it fails right now)