single table inheritance and legacy database