Re: [SQLObject] *id* column mandatory? BLOBS ?
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Jim V. <Jim...@no...> - 2003-08-13 20:15:56
|
Thanks for the information. Sorry that my question was imprecisely worded. May SQLObject be used with a table that has no primary key column (e.g., with a table whose key is a combination of columns -- some perhaps being non-integer)? -- jv Dave Poirier wrote: > On Wed, 2003-08-13 at 13:36, Jim Vickroy wrote: > > Hello, > > > > >From the documentation, it appears that SQLObject is for use with tables > > that have an *id* column. May SQLObject be used with tables that do not > > have an *id* column? > > > > Also, a previous post asked about support for BLOBS. Presently, there > > appears to be no such support. Are there plans to support BLOBS? > > > > Thanks, > > > > -- jv > > Yes, it is possible to name another column as being the primary key. > > alternateID: > > This boolean (default False) indicates if the column can be used as > an ID for the field (for instance, a username), though it is not a > primary key. If so a class method will be added, like byUsername which > will return that object. Use alternateMethodName if you don't like the > by* name (e.g. alternateMethodName="username"). > > The column should be declared UNIQUE in your table schema. > > see http://sqlobject.org/docs/SQLObject.html for further details. > > -Dave |