The current version of SQLObject only supports integer primary key columns (can
use a different name than 'id' using the _idName class attribute). I believe
there is a patch to allow non-integer single key columns. There has been a lot
of discussion of multi-column primary keys, but I'm not aware of any
implementation.
There has been no effort towards having tables with *no* primary key
constraint, but I don't think that's what you're really wanting.
I haven't looked at what it will take to support BLOBs, my guess is a release
implementation won't exist until the marshall/unmarshall column code exists
(same thing that full BooleanCol support is waiting for).
Sorry I can't be more helpful,
- Luke
Quoting Jim Vickroy <Jim.Vickroy@...>:
> 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
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
> _______________________________________________
> sqlobject-discuss mailing list
> sqlobject-discuss@...
> https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
>
--
The Pursuit of Counterfactual Histories
|