[Dbix-class] howto extend dbix::class to automatically updatesecond table

Oleg Pronin syber.rus at gmail.com
Thu Apr 5 16:46:06 GMT 2007


If so then why do you need DBIx::Class at all? Use DBI :)

2007/4/5, Hartmaier Alexander <Alexander.Hartmaier at t-systems.at>:
>
> You can override sub insert or use triggers if your db supports them.
>
> I'd create a simple sub which does what you described and call this
> instead
> of insert.
> Everything else will be hard to debug and understand for others if they
> have
> to.
>
> -Alex
>
>
> > -----Urspr=FCngliche Nachricht-----
> > Von: Mario Minati [mailto:mario.minati at googlemail.com]
> > Gesendet: Donnerstag, 05. April 2007 02:12
> > An: dbix-class at lists.rawmode.org
> > Betreff: [Dbix-class] howto extend dbix::class to automatically
> > updatesecond table
> >
> > Hello @all,
> >
> > I would like to extend dbix::class in the following way:
> >
> > When creating a new row in one of my tables I would like to
> > automatically get
> > an entry in a second table.
> >
> > More concrete:
> > Table 1 holds address data
> > Table 2 holds telephone numbers
> > Table 3 holds a GUID, a table name and a id
> >
> > When a new row is created in table 1 or 2 I would like to get a new row
> > in
> > table 3 with a new guid and the name of table 1/2 and the id of the
> > newly
> > created row in table 1/2.
> >
> > How and where do I have to extend DBIx::Class or create a new
> > component?
> >
> > Any hints and tips are welcome.
> >
> > Greets,
> > Mario Minati
> >
> > _______________________________________________
> > List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
> > Wiki: http://dbix-class.shadowcatsystems.co.uk/
> > IRC: irc.perl.org#dbix-class
> > SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
> > Searchable Archive: http://www.mail-archive.com/dbix-
> > class at lists.rawmode.org/
>
>
> _______________________________________________
> List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
> Wiki: http://dbix-class.shadowcatsystems.co.uk/
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
> Searchable Archive:
> http://www.mail-archive.com/dbix-class@lists.rawmode.org/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20070405/b4e=
ff8f9/attachment.htm


More information about the Dbix-class mailing list