Hi All,

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:
Table: Groups
Columns: Groupid, Groupname, GroupDescription

Table: GroupsHosts
Columns: Groupid, Hostid

Table: Hosts
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
groupshosts table.

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
produced either.

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.


Derek Wrobel
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to