On 1/31/06, Kevin Dangoor <[EMAIL PROTECTED]> wrote:
>
> On 1/31/06, Mark Ramm <[EMAIL PROTECTED]> wrote:
> >
> > > And now my inserts happen imediately, and I don't have to use
> > > database.commit_all()
> >
> > I spoke too soon.  The queries are being printed in the debugger, but
> > I get nothing when I do hub.commit, and exiting the shell and
> > returning to it shows that the data was not inserted into the
> > database.
> >
> > It probably goes without saying but I also have the same problem with
> > saving to the database from a controller...
>
> That's mighty odd. Since database.commit_all() works, that would seem
> to imply that you've got multiple hubs going. Let's take a look at
> that.
>
> In [1]:from turbogears import database
>
> In [4]:database._hubs
> Out[4]:{'sqlite:///tmp/book.db?debug=1':
> <turbogears.database.AutoConnectHub object at 0x1112f50>}
>
> In [5]:database.hub_registry
> Out[5]:Set([<turbogears.database.AutoConnectHub object at 0x1112f50>])
>
> In [6]:from linkkeeper import model
>
> In [7]:model.hub is hub
> Out[7]:True
>
> Kevin
>

Strangely all this turns out as expected (that is as you would expect
if there were no problem!  but of course there is a problem. :(

I spent the last several hours debugging this, and everything seemed
to work as expected, but the hub-commit was doing nothing.   So I ran
some SQLObject tests completely outside of TurboGears, and those ran
as expected.

I was trying to get proper debugging working in Wing on all of
TurboGears and SQLObject, when I discovered that somehow in one of my
recient updates it seems that the problem has gone away everywhere
except the tg-admin shell (even the toolbox console works!!!).

I've tried to figure out what is different in the shell, than
everywhere else, but I've not yet found it.

--
Mark Ramm-Christensen
email: mark at compoundthinking dot com
blog: www.compoundthinking.com/blog

Reply via email to