a.info={}
1/Query   :  UPDATE Acct SET Info = (NULL) WHERE id = (203)

a.info={1:2}
1/Query   :  UPDATE Acct SET Info = ('(dp1\nI1\nI2\ns.') WHERE id = (203)

a.info=[]
1/Query   :  UPDATE Acct SET Info = (NULL) WHERE id = (203)

a.info=[None]
1/Query   :  UPDATE Acct SET Info = ('(lp1\nNa.') WHERE id = (203)

>>> cPickle.dumps({})
'(d.'

would it be an encoding problem?

Oleg Broytmann a écrit :
On Fri, Mar 14, 2008 at 07:28:47PM +0100, sophana wrote:
I've noticed a very strange problem on one of my servers:
I have a pickleCol named info
I write:
a.info={}
then a.info returns None
In the database, it is written NULL
The problem is happens with both sqlobject 0.8.7 and 0.9.5 on fedora core 7

I have no problems with 0.9.5 on ubuntu (python 2.5)
Strange isn't it?

   Amazingly strange! Well, you know where to start - "?debug=1", especially
if the problem on FC7 is reproduceable.
   I just tested it a bit - just in case - with SQLObject 0.9.5 and 0.10.0
under PostgreSQL and SQLite - works fine:

test = Test(data=1)
test.data = {}

 2/QueryIns:  INSERT INTO test (data) VALUES ('STEKLg==
')
 2/QueryR  :  INSERT INTO test (data) VALUES ('STEKLg==
')
 3/QueryOne:  SELECT data FROM test WHERE id = (1)
 3/QueryR  :  SELECT data FROM test WHERE id = (1)
 4/Query   :  UPDATE test SET data = ('KGRwMQou
') WHERE id = (1)
 4/QueryR  :  UPDATE test SET data = ('KGRwMQou
') WHERE id = (1)

   (under SQLite PickleCol uses base64.)

Oleg.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to