[html-formfu] Re: HTML::FormFu and many-to-many model

Alex Povolotsky tarkhil at over.ru
Wed Apr 2 09:03:35 BST 2008


Lance A. Brown wrote:
> Zbigniew Lukasiak said the following on 4/1/2008 6:21 AM:
>> Please try to write a test case - this looks like an important bug -
>> but it's very hard to guess what is really failing.  First verify it
>> if is really a PostgreSQL thing - check if the same schema works in
>> SQLite.
>
> I have also run into this, using the following forms file to list the 
> roles assigned to a user using the "standard" Users/UserRoles/Roles 
> table setup in the Catalyst documentation.
>
> id: form
> auto_id: %n
> indicator: submit
>
> elements:
>   - name: user_id
>     type: Hidden
>   - type: Checkboxgroup
>     name: roles
>     model_config:
>         DBIC:
>             model: DBIC::Roles
>             default_column: me.role_id
>             label_column: long_name
>   - type: Submit
>     name: submit
>     value: OK
>
> To make this work, I had to change the default_column from 'role_id' 
> to 'me.role_id' because role_id was not unique in the SQL statement.  
> I'll try to work up a small test case that demonstrates the problem.
>
> --[Lance]
>
It will break save_to_model :(

DBIx::Class works incorrectly with that kind of relationship

Alex




More information about the HTML-FormFu mailing list