Hi,

I have a fairly complex model using the declarative layer.
For a simple table 'fassung'

Toolbox2=# \d fassung
                                   Table "public.fassung"
    Column    |         Type          |                     Modifiers 

-------------+-----------------------+----------------------------------------------------
  id          | bigint                | not null default 
nextval('"fassung_id_key"'::text)
  nr          | integer               |
  bezeichnung | character varying(50) |
Indexes:
     "fassung_pkey" primary key, btree (id)


I habe the following definition

178     class Fassung(Base):$
179         __tablename__ = 'fassung'
180         __table_args__ = (
181             { 'autoload' : True, }
182         )

A simple query fails badly from within a unittest. I have checked
the whole mode definition and could not find and further reference
to the 'Fassung' mapper or 'fassung' table.

Bug or feature?

Andreas

-------


 > 
/local/HRS2/Devel/ajung/tb-dev/parts/modules-svn/toolbox/database/tests/test_database.py(61)testSimpleSelects()
-> rows = session.query(mapper).limit(50).all()
 
/home/ajung/.buildout/eggs/SQLAlchemy-0.5.0rc4-py2.4.egg/sqlalchemy/orm/session.py(908)query()
-> return self._query_cls(entities, self, **kwargs)
 
/home/ajung/.buildout/eggs/SQLAlchemy-0.5.0rc4-py2.4.egg/sqlalchemy/orm/query.py(95)__init__()
-> self.__setup_aliasizers(self._entities)
 
/home/ajung/.buildout/eggs/SQLAlchemy-0.5.0rc4-py2.4.egg/sqlalchemy/orm/query.py(109)__setup_aliasizers()
-> mapper, selectable, is_aliased_class = _entity_info(entity)
 
/home/ajung/.buildout/eggs/SQLAlchemy-0.5.0rc4-py2.4.egg/sqlalchemy/orm/util.py(466)_entity_info()
-> mapper = class_mapper(entity, compile)
 
/home/ajung/.buildout/eggs/SQLAlchemy-0.5.0rc4-py2.4.egg/sqlalchemy/orm/util.py(543)class_mapper()
-> mapper = mapper.compile()
 
/home/ajung/.buildout/eggs/SQLAlchemy-0.5.0rc4-py2.4.egg/sqlalchemy/orm/mapper.py(679)compile()
-> mapper._post_configure_properties()
 
/home/ajung/.buildout/eggs/SQLAlchemy-0.5.0rc4-py2.4.egg/sqlalchemy/orm/mapper.py(701)_post_configure_properties()
-> prop.init(key, self)
 
/home/ajung/.buildout/eggs/SQLAlchemy-0.5.0rc4-py2.4.egg/sqlalchemy/orm/interfaces.py(404)init()
-> self.do_init()
 
/home/ajung/.buildout/eggs/SQLAlchemy-0.5.0rc4-py2.4.egg/sqlalchemy/orm/properties.py(579)do_init()
-> self._post_init()
 
/home/ajung/.buildout/eggs/SQLAlchemy-0.5.0rc4-py2.4.egg/sqlalchemy/orm/properties.py(838)_post_init()
-> self.backref.compile(self)
 
/home/ajung/.buildout/eggs/SQLAlchemy-0.5.0rc4-py2.4.egg/sqlalchemy/orm/properties.py(989)compile()
-> mapper._compile_property(self.key, relation);
 
/home/ajung/.buildout/eggs/SQLAlchemy-0.5.0rc4-py2.4.egg/sqlalchemy/orm/mapper.py(643)_compile_property()
-> prop.init(key, self)
 
/home/ajung/.buildout/eggs/SQLAlchemy-0.5.0rc4-py2.4.egg/sqlalchemy/orm/interfaces.py(404)init()
-> self.do_init()
 
/home/ajung/.buildout/eggs/SQLAlchemy-0.5.0rc4-py2.4.egg/sqlalchemy/orm/properties.py(578)do_init()
-> self._determine_local_remote_pairs()
 
/home/ajung/.buildout/eggs/SQLAlchemy-0.5.0rc4-py2.4.egg/sqlalchemy/orm/properties.py(814)_determine_local_remote_pairs()
-> self.local_side, self.remote_side = [util.OrderedSet(x) for x in 
zip(*list(self.local_remote_pairs))]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd. & Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:i...@zopyx.com
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard

Reply via email to