[SQLObject] Getting the table name from a model?
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
|
From: Sean E. M. <Sea...@st...> - 2006-06-16 03:39:30
|
I'm using SQLObject with Pylons and I'm writing a script to automate the creation and setup of the development testing database based on the defined SQLObject classes. One thing I want it to do is issue raw SQL queries after running each createTable() method in order to change the table engine to InnoDB in each case.=20 So, here's my question: How do I get the table name that a model class is associated with from the model? Is it hidden away in some variable or method? I want a surefire way to get the table name associated with the model class, including if the table name has been overridden with sqlmeta, etc. I know it's not a typical usage, but it's going to make life a lot easier.=20 Thanks in advance.=20 - Sean McBride |