[EMAIL PROTECTED]:~/projects/py/timetracker$ python
Python 2.4.1+ (#2, Sep 17 2005, 00:18:43)
[GCC 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import dabo
>>> app = dabo.dApp(MainFormClass=None)
>>> app.setup()
Dabo Info Log: Thu Sep 22 14:29:36 2005: 1 database connection
definition(s) loaded.
Dabo Info Log: Thu Sep 22 14:29:38 2005: User interface set to 'wx' by dApp.
Dabo Info Log: Thu Sep 22 14:29:38 2005: wxPython Version: 2.6.1.1pre
wxGTK (unicode) (gtk2)
>>> app.dbConnectionDefs
{u'[EMAIL PROTECTED]': <dabo.db.dConnectInfo.dConnectInfo object at 0xb7a8c9cc>}
>>> conn = dabo.db.dConnection(app.dbConnectionDefs["[EMAIL PROTECTED]"])
>>> conn
<dabo.db.dConnection.dConnection object at 0xb77bb7cc>
>>> from biz.RealTimeEntries import RealTimeEntries
>>> bo = RealTimeEntries(conn)
>>> bo
<biz.RealTimeEntries.RealTimeEntries object at 0xb7b38c8c>
>>> bo.requery()
>>> bo.RowCount
11
>>> bo.RowNumber
0
>>> bo.new()
>>> bo.RowNumber
11
>>> bo.iid
'-1-dabotmp'
>>> bo.minvdesc
u''
>>> bo.minvdesc = "test"
>>> bo.save()
>>> bo.minvdesc
u'test'
>>> bo.iid
'-1-dabotmp'
I expected the bo at this point to have the pk as assigned by the
backend. If I now go ahead and modify any other fields and save again,
the save will fail because the update clause has "where iid = '-1-dabotmp'".
--
Paul McNett
http://paulmcnett.com
http://dabodev.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev