I'm trying to map an existing DB2 database to new python ORM objects. I wrote a very simple mapper class:
class Storage(Base):
__tablename__ = 'T_RES_STORAGE_SUBSYSTEM'
id = Column(Integer,primary_key=True,name='SUBSYSTEM_ID')
name = Column(String(255),name='NAME')
namealias = Column(String(256),name='NAME_ALIAS')
But when I try to map it, by executing a query it puts the DB2ADMIN
.tablename in front of every query, which of course lead to errors. If I execute the query manually by prepending TPC
.tablename to it, then everything works without issues.
How can I specify in a table definition which schema to use?