I got caught out by the requirements on a has_many relationship that there has to be a single column primary key on the related table (so that this can go into the hidden form field).

I've tried to add to the documentation for this, but am not happy I have clarified things (rather than made them more clumsy). Suggestions, rejections or acclamations welcome for the attached patch...

BTW in this case I had effectively a link table (so set up as though it was a many-to-many linking table) that had an additional piece of information in it, so wanted to use a has_many type relation to edit it - think of a order <-> products relation where its a many-to-many but each link has a quantity attached. In this case the primary key of the link table was a multicolumn key (order, product). I think this is a valid usage case, so the inability of the form model to handle it is a bit of a pain.

        Nigel.
--
[ Nigel Metheringham             nigel.methering...@intechnology.com ]
[ - Comments in this message are my own and not ITO opinion/policy - ]

Attachment: hfmd-has-many-key-doc.patch
Description: Binary data

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

Reply via email to