It appears that if during runtime I assign a schema to declarative, then
`inspect()` it, the resulting Selectable does not have the schema assigned
to it:
in model.py:
from sqlalchemy import Column, String, DateTime
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_ba
example:
import pyodbc
from sqlalchemy import create_engine
def creator():
config = {
'driver': 'ODBC Driver 13 for SQL Server',
'host': 'localhost',
'port': 1433,
'user': 'me',
'pw': 'mypw',
'dbname': 'mydb'
}
return pyodbc.connec
On Wednesday, June 13, 2018 at 8:28:32 PM UTC-4, Mike Bayer wrote:
>
> On Wed, Jun 13, 2018 at 7:44 PM, Peter Lai > wrote:
> > I've implemented a Concrete inheritance model and Oracle 11g is balking
> on
> > `CAST(NULL AS CLOB) as fieldn` during the pjoin
I've implemented a Concrete inheritance model and Oracle 11g is balking on
`CAST(NULL AS CLOB) as fieldn` during the pjoin union query execution with:
ORA-00932: inconsistent datatypes: expected - got CLOB
This happens when the unioned tables representing the 2 subclasses have
different `Text`
I wonder if one can also do this with Declarative Base classes using `type`
construction? Like, to dynamically create a Declarative Class from some
pre-defined namespace dicts:
Base = declarative_base()
metas = [{'__tablename__': 'footable'}, ...]
columns = [{ 'key': 'field1', 'type': Text}, .
I'm implementing a recursive upsert operation for an object whose primary
key also contains a foreignkey, and I'd like to get some more info from
IntegrityError, namely whether integrity was violated because the
foreignkey didn't exist (yet) or I am trying to insert a duplicate pkey. In
the for
Yeah it took me about 3 hours to realize that in my actual code, I made a
typo in the __init__ so that I was assigning the uuid to the wrong
attribute/column. So embarassing :(
On Monday, March 19, 2018 at 11:04:04 PM UTC-4, Peter Lai wrote:
>
> As seen at:
> https://stackove