[Dbix-class] How to represent this ?

Jess Robinson castaway at desert-island.me.uk
Fri Jun 29 16:51:33 GMT 2007



On Thu, 28 Jun 2007, myshare wrote:

> hi,
>
> How can I represent the following thing in DBIx::Class :
>
> table rel
> ------------------
> pk_id, table_ref, other_table_id
>
> and then I can have other tables like this :
>
> table_blah, table_another_one, table_foo, table_bar
>
> where table_ref is an integer that tells which table I'm relating to i.e. if
>
> %table_ref = {
> 1 => table_blah,
> 2  => table_another_one,
> 3  => table_foo,
> 4  => table_bar
> }
>


See the Admin/User example in the Cookbook.

Jess




More information about the Dbix-class mailing list