the indentation is simply what the tab was/is set to... trivial.
Great :-)

i already have an sql schema.. so i don't need sqlobject to create the table... i'm interfacing with a live mysql/db.

It  was just my reaction to the SQL code in your posting. I had a feeling you are creating/dropping the table using this code.

while it's easy/trivial to add the 'id' via calling the class, and setting the 'id' just like the other fields... my real goal/task was to see if you can set a field in the "set" method. the "set" method works for any field that i've tried, except the "id" issue!

the docs imply that you should be able to have the constructor be able to set a field within the constructor.

so.. this is the goal...

It is out of my current knowledge, I am working with SQLobject for about 2-3 weeks. But this technique looks interesting. I was trying to follow your example and following does not work for me. Can you please help me?

class foo(SQLObject):
    class sqlmeta:
        idName='id'
        idType=str
    aa =StringCol(length=5)
    id2 =StringCol(length=20)
 
    def _set_aa():
        d = 'tikdsljg'
        _SO_set_aa(d)

foo.createTable(ifNotExists=True)
tmp=foo(id="25", id2='ffff')

Anyway, where do you see the benefit of this approach? I think it is not a big difference if I control the id value outside of the table/class definition and then I insert the row values by calling the table object as usually.
Petr