Commits

paj committed 5301c57

Small change in ActiveMapper to make it work with Python 2.3

Comments (0)

Files changed (1)

lib/sqlalchemy/ext/activemapper.py

         for col in klass.columns:
             if col.foreign_key is not None:
                 found = False
-                table_name = col.foreign_key._colspec.rsplit('.', 1)[0]
+                cn = col.foreign_key._colspec
+                table_name = cn[:cn.rindex('.')]
                 for other_klass in ActiveMapperMeta.classes.values():
                     if other_klass.table.fullname.lower() == table_name.lower():
                         found = True