On 2010.09.03. 22:12, Nigel Metheringham wrote:
On 3 Sep 2010, at 09:11, Carl Franks wrote:

Hi Nigel,
It would be good to get that fixed - if you've time to work on a patch, it'd be 
appreciated!

Please could you cast your eye over revision r1740
        http://code.google.com/p/html-formfu/source/detail?r=1740

That works in test - although its pug ugly code.

BTW it looks like the test suite (or rather the module itself) now
causes warnings to be emitted by DBIx::Class:-
  DBIx::Class::ResultSource::compare_relationship_keys():
    compare_relationship_keys is a private method, stop calling it
    at 
/Users/nigel/Work/html-formfu/HTML-FormFu-Model-DBIC/blib/lib/HTML/FormFu/Model/DBIC.pm
 line 537

[error split up a bit]

I suspect this is a recent DBIC change.

        Nigel.

Hi!

I think, I have same problem with my form. My config is:

<elements>
  type                  Checkboxgroup
  name                  actions
  label_loc             Action
  reverse_group         0
  <constraints>
    type                AutoSet
  </constraints>
  <model_config>
    resultset           Action
    id_column           id
    label_column        action
    <condition>
      <id>
        >               1
      </id>
    </condition>
    <attributes>
      <order_by>
        -asc            action
      </order_by>
    </attributes>
  </model_config>
</elements>

The form and model->default_values works well, but model->create/update generates a wrong query:

DBI Exception: DBD::mysql::st execute failed: Column 'id' in where clause is ambiguous [for Statement "SELECT map_actions.id, map_actions.action, map_actions.method FROM Role_Action me JOIN Action map_actions ON map_actions.id = me.action_id WHERE ( ( id > ? AND me.role_id = ? ) )" with ParamValues: 0="1", 1="2"] at /usr/local/lib/perl5/site_perl/5.10.1/DBIx/Class/Schema.pm line 1061

Without the condition, the create/update works well. The resultset relationship is many_to_many and my Model::DBIC newer than the linked revision (0.08002). What about this?

Thanks

--
Gabor HALASZ <[email protected]>

_______________________________________________
HTML-FormFu mailing list
[email protected]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

Reply via email to