Leon wrote:
> Hi,
>
> Our biggest problem here is that the IDBroker can only generate Integer
> values. The same applies for sequences or auto increment primary keys.
I have no problem with Unique Ids being ints. That's just right. But that's
not so for general-case PKs.
> If you want Turbine or your RDBMS to generate unique id's for you, you'll
> probably find it easiest to go with a unique ID primary key. IMO it is
> anyway a good design decision to use unique ID's.
it is a good idea for entity tables but not for others. Not to look for an
example elsewhere look at Turbine's own schema. TURBINE_USER_GROUP_ROLE has
a PK comprised of three columns none of each is a autogenerated ID. And this
make a perfect sense here.
> We could document the fact that by default Peers use unique id Primary
keys.
> This should work for about 99.9% of the time. For all other cases people
> are free to access the raw database, or to edit generate Peer classes by
> hand for their specific needs.
I do not agree. All we need to do is not to mess PKs with IDs and we won't
force opeople to retract to raw access in 99% of the cases.
>
> It is not as if Peers will force you to use unique id primary keys.
You'll
> just have to do the work yourself if you want to do otherwise.
>
> just my 2c
>
> ~ Leon
>
> Fedor Karpelevitch wrote:
> >
> > I see this to be a common confusion between unique ID and primary key.
I
> > actually noticed this confusion throught the Peer system. Integer
unique
> > ID is just one special case of PK.
> >
> > Jason van Zyl wrote:
> >
> > > On Thu, 23 Nov 2000, fanyun wrote:
> > >
> > >
> > >> Hi,
> > >>
> > >> I am now using Torque 1.9a. I want a char field to be primary key.
> > >>
> > >> I find that in peer.vm, the buildCriteria function will have create
a
> line:
> > >>
> > >> if(obj.get${cfc}() > 0)
> > >>
> > >>
> > >> This will give out an type mismatch error when compile.
> > >>
> > >>
> > >> Any comment?
> > >
> > >
> > > You can simply remove that line from your generated
> > > peer, or you can remove that line from the Peer.vm
> > > template before you generate your peers
> > > and it will compile. The assumption was
> > > made that the primary key would be an integer
> > > type, but I will look into making it more flexible
> > > and not to assume a single column, integer primary
> > > key.
> >
> >
> >
> > ------------------------------------------------------------
> > To subscribe: [EMAIL PROTECTED]
> > To unsubscribe: [EMAIL PROTECTED]
> > Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> > Problems?: [EMAIL PROTECTED]
> >
>
>
>
> ------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> Problems?: [EMAIL PROTECTED]
>
fedor.
_______________________________________________________
Tired of slow Internet? Get @Home Broadband Internet
http://www.home.com/xinbox/signup.html
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]