Hi there,
On Query(...)get_by(..) I get this exception:
Traceback (most recent call last):
File
"/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py",
line 103, in _run
applyFilters('before_main')
File
"/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/filters/__init__.py",
line 151, in applyFilters
method()
File
"/home/arnarb/workdir/verkstjorinn/tg-svn/trunk-sa02/turbogears/visit/api.py",
line 140, in before_main
visit= _manager.visit_for_key( visit_key )
File
"/home/arnarb/workdir/verkstjorinn/tg-svn/trunk-sa02/turbogears/visit/savisit.py",
line 31, in visit_for_key
visit= TG_Visit.lookup_visit( visit_key )
File
"/home/arnarb/workdir/verkstjorinn/tg-svn/trunk-sa02/turbogears/visit/savisit.py",
line 66, in lookup_visit
return Query(TG_Visit).get_by( visit_key=visit_key );
File
"/usr/lib/python2.4/site-packages/SQLAlchemy-0.2.2-py2.4.egg/sqlalchemy/orm/query.py",
line 15, in __init__
self.mapper = class_mapper(class_or_mapper, entity_name=entity_name)
NameError: global name 'class_mapper' is not defined
I changed that last line to
self.mapper = mapper.class_mapper(class_or_mapper, entity_name=entity_name)
in sqlalchemy/orm/query.py - just wondering if that's the correct thing to do?
Arnar
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users