[orm-devel] No such attribute or function 'oid'
Mon, 13 Jan 2003 14:50:29 +0100
>I guess that I can't work with PostgreSQL views as orm objects because
>views don't have oid's(?). It seems orm is reliant on oid (at least for
>PostgreSQL). It might be nice to be able to specify the primary key in
>when creating the dbclass subclass and having it us the pk instead of
>the oid. Just a thought.
Yes, the pgsql adapter uses oids. It will add 'oid,' to any SELECT
statement it creates.
Check out this thread on orm-devel:
which contains a patch to adapters.pgsql.datasource that you might
find helpfull. Also it might be possible to write the query on the
view by hand and use the datasource.runSelect method to execute it. I
think that's they way Mike went. The selectResult class does not rely
on the oid to be present.
Take a look at the patch: do you think it should be included with
orm? After Mike found a solution he thought satisfactory the patch
didn't make it to the distribution...
(Uh.. I don't think it will work nicely, you might need to insert it
by hand... sorry about that...)
_..._ Diedrich Vorberg
/ _ _ \ http://www.tux4web.de
| (o)_(o) | firstname.lastname@example.org
\( ) / .---.
//'._.'\ \ / \ Internet Dienstleistungen
// . \ \ \.@-@./ und 'Consulting'.
|| . \ \ /`\_/`\
|\ : / | // _ \\ Linux Rules!
\ `) ' (` /_ | \ )|_
_)``".____,.'"` (_ /`\_`> <_/ \
) )'--'( ( \__/'---'\__/