I just tested your test and can approve that it's bug.
Further debuging revealed that it seams to be a bug in
HTML::FormFu::Element::Repeatable. The 'counter_name' field is not
adopted to the parents nested_name apropriately.
So we need to add some more wired logic in Repeatable.
But it's too late for me now (almost midnight), working on Repeatable
needs a fresh mind.
As I'm all day busy tomorrow, I'll try to find a solution for this on
the weekend.
Greets,
Mario Minati
Ascii King schrieb:
OK. So, three months later I have the test files done that will test
the ability to write to a repeatable nested within another repeatable
in HTML-FormFu-Model-DBIC. I am a little afraid to commit these to the
trunk(?), though because I don't want to mess up everything.
I have attached the test files and the files I have altered. I have
also documented my changes.
The tests create the following relationship
Master -> has_many -> Schedule
Schedule -> has_many -> Task
It then creates a record in Master and two associated records in
Schedule.
It then creates two records in Task that are both associated with the
second record in Schedule.
It then tries to use the form to change the records.
It successfully changes the first associated record in Task. (Test 5)
It fails to change the second associated record in Task. (Test 7)
What can I do to get this fixed? I'm willing to help, but I'm not a
strong programmer.
Carl Franks wrote:
Yes - that's a good example.
You'll need to checkout the entire distribution with
svn co
http://html-formfu.googlecode.com/svn/trunk/HTML-FormFu-Model-DBIC
The test schema is described in t/lib/MySchema/
If there's no suitable repeatable->repeatable relationships - if you
create any new tables, then as well as updating the schema, you'll
also need to update new_db() in t/lib/DBICTestLib.pm which is called
by each test file to create the sqlite database.
Rather than `make test`, I prefer using `prove` to run the test files,
as it lets you run an individual test file.
You'll need to install Test-Harness to get `prove`.
prove -l t/update/has_many_repeatable.t
To create a patch file, you'll need to add any new files with `svn
add filename`
and then create the patch file with `svn diff > patchfile`
Good luck!
Carl
------------------------------------------------------------------------
_______________________________________________
HTML-FormFu mailing list
HTML-FormFu@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
_______________________________________________
HTML-FormFu mailing list
HTML-FormFu@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu