[Catalyst] has_many and belongs_to with InstantCRUD

Jess Robinson castaway at desert-island.demon.co.uk
Thu Jun 15 13:43:46 CEST 2006



On Wed, 14 Jun 2006, Zbigniew Lukasiak wrote:

> Hi,
>
> In the current InstantCRUD there is no support for any relations
> between tables.  You need to to extend it yourself for that
> functionality.
>
> The 'instantcrud' prefix for the DBIx::Class classes is not needed - I
> did not add anything to the DBIx::Class library - all standard
> DBIx::Class documentation applies here and the relations should take
> the names of the classes:
> __PACKAGE__->belongs_to(user => 'DBSchema::Users');
> is correct since the other class is 'DBSchema::Users'
>

Except it's not correct, as he has no "user" column in the Messages table, 
and the belongs_to doesnt specify which field its talking about..

belongs_to is for saying "the content of this field is an id in that other 
table", which field did you mean?

Jess




More information about the Catalyst mailing list