Re: tablename/guid vs. classname/guid

Piotras <pp-VVDi8QVAvoBWk0Htik3J/[email protected]>
Newsgroups gmane.comp.web.midgard.devel
Message-ID <[email protected]>
Torben Nehmer <[email protected]> wrote:

> > Real example could use midgard_group and org_openpsa_organization.
> > Both types use grp table. But use different columns.
> > 
> > Of course get_by_guid method shouldn't make any repligard table lookups. 
> 
> Ok, very well. What do you do when you move the id column of a table to a guid?

SELECT typename from repligard , create new object instance and get_by_guid 
( the same guid used as function parameter ).
 
> Wouldn't it be better to always return a "base type" (using scenario 1) and let
> the application decide what it does.

We should have some schema stack then. ( oh, did I say stack? ;)
This forces us to make special language bindings hacks.

> I see the benifits of both implementation, but I fear the side-effects of the
> possibility that a single db object has multiple guids across the types.

I get Your point , and frankly speaking I think both scenarios are bad then.
But it also depends how classes constructors work.

Piotras
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.