Saturday, October 4, 2008

How to save extra field in join table in HATBM Cake1.2

Hi all,
I saw "Storing additional data on join table" https://trac.cakephp.org/ticket/828.
Having, two tables associated with HABTM: tags, posts, posts_tags
posts_tags{ post_id,tag_id,weight }

Can anyone help me showing how to use it, in the Post 's add or Post
's edit view in to populate "weight" field in posts_tags.weight
column?


I am thinking to use Checkbox options to select related
posts_tags.weight, And input text to enter weight.

I've been struggling with this issue for few weeks with HABTM where
the join table record is deleted and reinserted everytime, thus the
posts_tags.weight column were never saved?

Thanks

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: