SQLite needs some heavy refactoring, the subroutines are becoming too complex to understand easily.
MySQL needs implicit FK support, I think.
-Need tests for left_base_classes, additional_classes, additional_base_classes...
Consider:
If local column is UNIQUE or PK, use has_one() for relation?