[Rt-devel] multiple primary keys?

Ruslan Zakirov ruslan.zakirov at gmail.com
Wed Jun 28 19:29:38 EDT 2006


1) compound primary key feature was never finished. I don't think it
could be added in backward compatible way.
2) Source+Timestamp is not unique pair as timestamp has not enought resolution.

On 6/29/06, Josh England <jjengla at sandia.gov> wrote:
> Hi,
>
> I'm trying to make an RTx::EventTracker package similar to the
> AssetTracker integration.  The thing is, in trying to make this
> lightweight I'd like to move away from using 'id' as a primary key in my
> events table.  Instead I'd like to use two primary keys, timestamp and
> source.
>
> DBIx::SearchBuilder doesn't seem to support multiple primary keys...it
> complains when I try to run anything that calls _DoSearch().  However,
> there is a function called LoadByPrimaryKeys (not used anywhere in RT)
> that claims basic support for 'compound' primary keys, whatever those
> are.  Is there a way to use SearchBuilder with multiple primary keys or
> do I have to bite the bullet and add a seemingly useless 'id' field to
> my database table?
>
> -JE
>
>
>
> _______________________________________________
> List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel
>
> Best Practical is hiring! Come hack Perl for us: http://bestpractical.com/about/jobs.html
>


-- 
Best regards, Ruslan.


More information about the Rt-devel mailing list