[Rt-devel] multiple primary keys?

Todd Chapman todd at chaka.net
Wed Jun 28 20:16:06 EDT 2006


On Wed, Jun 28, 2006 at 05:09:39PM -0600, Josh England 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?
> 

A little of the subject, but why not use a Ticket or Asset to 
store your events?



More information about the Rt-devel mailing list