[html-formfu] Extremly simple patch to HTML::FormFu::Model::DBIC

Carl Franks fireartist at gmail.com
Thu Apr 17 08:51:26 BST 2008


On 17/04/2008, Alex Povolotsky <tarkhil at over.ru> wrote:
> Carl Franks wrote:
>
> > cool - but can you also run the 'svn add' command on your new test
> > files(s) so that they also get included in the patch file?
> >
> > we're almost there... ;)
> >
> >
>
>  Sent the patch to list a week ago. No reply (yet).

You know this is all voluntary, yes?

Okay - while the patch you sent does make your new test file pass, it
also causes a lot of other tests to fail.

It shouldn't be changing the column to "me.id" it should be changing
it to "rel-name.id".
It just happens to work for your test, because both PK's have the same name.
Unfortunately, we can't get the "rel-name" out of DBIC, because
many_to_many's aren't real relationships, as far as DBIC is concerned.

The correct solution to this, is to explicitly tell FormFu to use "rel-name.id"

  - type: Select
    name: twos
    multiple: 1
    model_config:
      DBIC:
        default_column: 'twoid.twoid'

Cheers,
Carl



More information about the HTML-FormFu mailing list