Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #563 (closed defect: worksforme)

Opened 13 years ago

Last modified 12 years ago

SQLObject and MultipleJoin creation

Reported by: elver.loho@… Owned by: anonymous
Priority: normal Milestone:
Component: SQLObject Version: 0.8
Severity: blocker Keywords:


I have an SQLObject in a one-to-many relationship with another SQLObject.

In Foo I have bar = MultipleJoin?("Bar") In Bar I have foo = ForeignKey?("Foo")

Basically each Foo can have multiple Bars and each Bar has a single Foo.

However, I want to create some Foo instances that do not reference any bars. This seems to be impossible. The MultipleJoin? statement does not take default=None and when I simply run foo = Foo(), then I get the error:

... File "/usr/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1457-py2.4.egg/sqlobject/dbconnection.py", line 217, in _runWithConnection

val = meth(conn, *args)

File "/usr/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1457-py2.4.egg/sqlobject/sqlite/sqliteconnection.py", line 106, in _queryInsertID


File "/usr/lib/python2.4/site-packages/sqlite/main.py", line 244, in execute

self.rs = self.con.db.execute(SQL)

TypeError?: execute() argument 1 must be string without null bytes, not str

Is this a problem with SQLObject or with SQLite?

Change History

comment:1 Changed 13 years ago by elver.loho@…

  • Status changed from new to closed
  • Resolution set to worksforme

SQLite doesn't support SQLObject's MultipleJoin? stuff. MySQL works fine, however.

Note: See TracTickets for help on using tickets.