Hi,

Our biggest problem here is that the IDBroker can only generate Integer
values.  The same applies for sequences or auto increment primary keys.

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.

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.

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]

Reply via email to