Tag Archives: orm

ORA-00932: inconsistent datatypes: expected NUMBER got BINARY

I got the following error: ORA-00932: inconsistent datatypes: expected NUMBER got BINARY on line: <property name="customer" column="CustomerId" /> the fix for above error was to use many-to-many tag instead of plain <property>: <many-to-one name="customer" column="CustomerId" /> Note that class is … Continue reading

Posted in en | Tagged , , , | 5 Comments

Automatically migrate SQL schema in SQLObject

When you're building an application you have to extends your model (and alter database schema that is placed under the model). I've found a method to automatically upgrade SQL schema (only ADD COLUMN operations for now): from sqlobject import * … Continue reading

Posted in en | Tagged , | Comments Off on Automatically migrate SQL schema in SQLObject

How to make SQLObject instances "picklable"?

I tried to store SQLObject instances in a session, but had problems with pickling them. Here is smart base class for model classes that allow to fast pickle / unpickle operation: from sqlobject import * import logging class Base(SQLObject): def … Continue reading

Posted in en | Tagged , | Comments Off on How to make SQLObject instances "picklable"?