[Catalyst] Help following instructions - FormFu issues
derekwrobel at gmail.com
Thu Sep 20 23:17:49 GMT 2012
I am following the instructions from this tutorial:
But am using my own database. I have a MS SQL database with 3 tables (no
primary keys) linked as follows:
Columns: Groupid, Groupname, GroupDescription
Columns: Groupid, Hostid
Columns: Hostid, HostName, HostIPAddress
Because these tables do not have a primary key set, to have Catalyst
function correctly, I had to manually add:
__PACKAGE__->set_primary_key( "hostid" );
and so forth for the groups and hosts schema\result\*.pm files
Everything in the tutorial so far has been working well and I am at the
point where I want to have more advanced CRUD in my application.
I can manually add a host, including a free text field that allows entry of
groupid, so that on creation of the host, it also inserts a record into the
However, trying to use this more advanced FormFu, following the exact
steps, I am able to get the form, with groups list box, but upon save, only
the host gets saved, and no group information is saved. No errors are
I was trying to understand the steps in this tutorial, and do not even see
any place in this tutorial for FormFu that would also save the
groupid/hostid information to my groupshosts table. Is this because when
relationships are properly set up, FormFu can automatically handle this and
knows to save the groupid in the groupshosts table?
Do you know what I am missing that I cannot get the groupid entry to be
I would have thought the code in the controller for this formfu_create
would need code besides the $form->model->update($host); to save the
groupid as well.
Any help would be greatly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Catalyst