On 5 February 2010 23:30, Petr Jakeš <pet...@tp...> wrote:
> Sorry to bother the list. My hands were to fast and my brain to slow (as
> usually :D )
>
>> PsMessageReaded(id = myId, idEmployee=3, dateAdd = tStamp)
>>
>
> This code works:
> PsMessageReaded(idMessage = myId, idEmployee=3, dateAdd = tStamp)
>
> I am able to write the values to the database, but I am getting following
error:
File
"/usr/lib/python2.5/site-packages/SQLObject-0.10.1-py2.5.egg/sqlobject/main.py",
line 1247, in _SO_finishCreate
self._init(id)
File
"/usr/lib/python2.5/site-packages/SQLObject-0.10.1-py2.5.egg/sqlobject/main.py",
line 923, in _init
raise SQLObjectNotFound, "The object %s by the ID %s does not exist" %
(self.__class__.__name__, self.id)
sqlobject.main.SQLObjectNotFound: The object PsMessageReaded by the ID 0
does not exist
I think this is because SQLObject is trying to read-back the values for the
new instance, but is confused by the different ID naming.
Of course I can live with this (catching exception).
Regards
Petr
|