[#2238] Code generation runs extremely slow for large schemas
(Inefficient DefaultRelations.getUniqueKeys() and getForeignKeys()
methods)