Hello all,

I want to map a table whose name is BAND_ORDER_OF_LOCAL_TESTING.

class BandOrderOfLocalTesting(Base):
    __TABLENAME__ = 'BAND_ORDER_OF_LOCAL_TESTING'
    order_id = Column("order_id", Number(18), primary_key=True)
    ...

Each time I got the following message:
013-04-17 09:26:55,857 INFO sqlalchemy.engine.base.Engine {'ROWNUM_1': 1}
Traceback (most recent call last):
  File "tables.py", line 108, in <module>
    instance = session.query(BandOrderOfMonth).first()
  File 
"/usr/lib/python2.7/site-packages/SQLAlchemy-0.8.1dev-py2.7.egg/sqlalchemy/orm/query.py",
 
line 2181, in first
    ret = list(self[0:1])
  File 
"/usr/lib/python2.7/site-packages/SQLAlchemy-0.8.1dev-py2.7.egg/sqlalchemy/orm/query.py",
 
line 2048, in __getitem__
    return list(res)
  File 
"/usr/lib/python2.7/site-packages/SQLAlchemy-0.8.1dev-py2.7.egg/sqlalchemy/orm/loading.py",
 
line 72, in instances
    rows = [process[0](row, None) for row in fetch]
  File 
"/usr/lib/python2.7/site-packages/SQLAlchemy-0.8.1dev-py2.7.egg/sqlalchemy/orm/loading.py",
 
line 356, in _instance
    tuple([row[column] for column in pk_cols])
  File 
"/usr/lib/python2.7/site-packages/SQLAlchemy-0.8.1dev-py2.7.egg/sqlalchemy/engine/result.py",
 
line 71, in __getitem__
    processor, obj, index = self._parent._key_fallback(key)
  File 
"/usr/lib/python2.7/site-packages/SQLAlchemy-0.8.1dev-py2.7.egg/sqlalchemy/engine/result.py",
 
line 314, in _key_fallback
    expression._string_or_unprintable(key))
sqlalchemy.exc.NoSuchColumnError: "Could not locate column in row for 
column 'BAND_ORDER_OF_LOCAL_TESTING.order_id'"

Is there a limit of table name in sqlalchemy?
How to solve this problem?

Best regards,
Evan

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


Reply via email to