Re: [SQLObject] Final patch for 0.4 with unit tests
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
|
From: Ian B. <ia...@co...> - 2003-07-01 20:15:24
|
On Tue, 2003-07-01 at 10:56, Matt Goodall wrote:
> This is just a quick thought, and probably something for a later
> release, but couldn't an alphanumeric id be expressed something like
> this:
>
> class Pet(SQLObject):
> id = IdCol(type='alpha', length=32)
> code = StringCol()
> name = StringCol()
> toyID = IntCol(foreignKey='Toy')
> _joins = [...]
Yes, I think this is better. Or rather:
class Pet(SQLObject):
id = StringCol(length=32)
That it's named "id" would imply its role. You could then use a dbName
argument in lieu of _idName.
Ian
|