<div dir="ltr"><div>Hi all,</div><div><br></div><div>and thank you authors for a great product. </div><div><br></div><div>I come from a oracle-database background and I am relatively new to python and an absolute infant in pony.orm </div>
<div><br></div><div>I am now in the midst of creating an application that uses existing Oracle database schema. I have been playing around with pony.orm and I think it would save me a ton of work if I could use that. I have already tested it towards a seperate schema and having it to create it own tables and everything works just great. However when I a ran it against a copy of the original schema it complaints it cannot find TABLE_SITE table.</div>
<div><br></div><div>The problem is that pony.orm forces tablenames to lowercase. That in itself would be fine except that also forces you to use parenthesis around tablenames in Oracle queries. </div><div><br></div><div>(see: <a href="http://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements008.htm">http://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements008.htm</a>)</div>
<div><br></div><div>The results are like this: (actual names changed) </div><div><br></div><div>SQL> select * from tab;</div><div><br></div><div>TNAME<span class="" style="white-space:pre"> </span> TABTYPE<span class="" style="white-space:pre"> </span>CLUSTERID</div>
<div>------------------------------ ------- ----------</div><div>CUSTOMERS_SITE<span class="" style="white-space:pre"> </span> TABLE</div><div>customers<span class="" style="white-space:pre"> </span> TABLE</div>
<div>persons <span class="" style="white-space:pre"> </span> TABLE</div><div>readings<span class="" style="white-space:pre"> </span> TABLE</div><div><br></div><div>SQL> select name from customers;</div><div>
select name from customers</div><div> *</div><div>ERROR at line 1:</div><div>ORA-00942: table or view does not exist</div><div><br></div><div>Of course using "select name from "customers"; would work fine. The problem is that it would mean code-change in other applications using the same schema and that doesn't work. An older application accessing the pony.orm created schema results in:</div>
<div><br></div><div> File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/reflection.py", line 512, in reflecttable</div><div> raise exc.NoSuchTableError(<a href="http://table.name">table.name</a>)</div>
<div>sqlalchemy.exc.NoSuchTableError: sites</div><div><br></div><div><br></div><div>Is there any way to override the behaviour of pony.orm when creating tables for Oracle?</div><div><br></div><div>Kind regards,<br></div><div>
Bjarni</div></div>