Menu

#21 Bigint type fix

closed-fixed
nobody
General (125)
5
2004-08-18
2004-04-22
Anonymous
No

Problem #1
I am using SQLObject for my latest project that I need
bigint primary keys. In order to get things to work i
had to touchup the Converters.py file. I registered a
new Converter for the long type so that when it gets
converted it doesn't add the SQL incompatible (ex.
'0L') L at the end. So around line 102 I added.

#lakowske 4/18/04 fixes long type conversion

def LongConverter(value, db):

return repr(str(value))

registerConverter(type(0L), LongConverter)

Problem #2
I'm using SQLObject 0.5.1 because with the new 0.5.2 I
can't call [MyInheritedSQLObjectClass].new(). SQLObject
wants to stick a extra primary key in the sql
statement. Note: I am using alternative primary keys
via. _idName = 'uid', and of course I'm having the
classes built from the tables via. _fromDatabase =
'fuser'. I haven't dug through the source code on this
one, since 0.5.1 works fine, though it would be nice if
a fix was made so that I (and others who use
_fromDatabase and _idName) can stay up to date.

In any case, thanks for the great software.

Seth Lakowske
salakowske@wisc.edu

Discussion

  • Ian Bicking

    Ian Bicking - 2004-08-18

    Logged In: YES
    user_id=210337

    I'm not clear the second report. First is fixed in 0.6.
    I'll need more of an explanation for that.

     
  • Ian Bicking

    Ian Bicking - 2004-08-18
    • status: open --> closed-fixed
     

Log in to post a comment.