--- a/Allura/allura/model/index.py
+++ b/Allura/allura/model/index.py
@@ -12,8 +12,9 @@
 import ming
 from ming import schema as S
 from ming.utils import LazyProperty
-from ming.orm import MappedClass, session
+from ming.orm import session
 from ming.orm import FieldProperty, ForeignIdProperty, RelationProperty
+from ming.orm.declarative import MappedClass
 
 from allura.lib import helpers as h