[html-formfu] Re: HTML::FormFu and many-to-many model
Lance A. Brown
lance at bearcircle.net
Wed Apr 2 05:53:06 BST 2008
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]
--
GPG Fingerprint: 409B A409 A38D 92BF 15D9 6EEE 9A82 F2AC 69AC 07B9
CACert.org Assurer
More information about the HTML-FormFu
mailing list