[rt-devel] extending rt3 classes? (fwd)
Alex Porras
alex at mediaocean.com
Fri Oct 10 10:42:49 EDT 2003
On Thu, 9 Oct 2003, Nick Pleis wrote:
> I'm assuming the database table that your using will mirror that
> RT3->Tickets.
Correct. It would be based on that table. Initially, I had thought to
use the same table, as it seems to have a 'type' column, but I think I'd
be afraid to clash with actual ticket data, so I'm just going to use a
separate table.
> I BELIEVE that you can subclass the RT::Ticket table with no problems. What
> you'll actually be subclassing is the aggregate of RT::Ticket and
> RT::Ticket*_Overlay.
[snip]
Okay, that's precisely what I wanted to find out. I had done a test, but
I later realized that I had done the test incorrectly, so the child class
wasn't being used, which is what prompted me to wonder about the _Overlay
stuff.
> On a more general note, it will likely be MUCH easier to build your own
> searchbuilder (or RT::Record) derived class instead of using RT::Ticket as
> your starting point.
Sound like you may be right. I went through some of the RT::Record code
and saw that an instance of RT::Record represents a single table. If I
wanted to write data to several tables, however, would it just involve
several different RT::Record objects (one per table), and have the calls
(i.e. Create) inside of $RT::Handle->BeginTransaction() and
$RT::Handle->Commit()/$RT::Handle->Rollback() calls?
I appreciate your help, Nick.
Regards,
--Alex
More information about the Rt-devel
mailing list