php - hasAndBelongsToMany relationship in CakePHP not saving the data -
I am facing a problem in the KPHP and I want to go to Bellgoms This is the table structure that I have used. I have a model in Written code is written: At the time of saving, I am receiving the following data. But the problem is that this data is not saved in the According to the HABT KPPHP conference, the ID column is never present, the data is not saved. will only have the following fields For example if the posts are related to tags in HABT, then the Your table structure bs_categories and < There are too many connections to the code> bs_listing_types tables (one category can have multiple entry types).
bs_categories ------------ - id int (10) parent_it int (10) lft int (10) rgat int (10) title work (255) body Text meta_title formatting (255) meta_keyword text meta_desk text slog varchar (255) status int (1) date-time modified datetime bs_listing_types ----------------- id int (11) title varchar (255) position int (1) created datetime modified datetime bs_listing_types_categories ----------- ---------------- id int (11) listing_type_ident (11) Category_ID int (11)
/ ** * andBelongSyahon Associations * * @Syar Array * / Public $ andBelongsetTime = Array ('ListTip' => Array ('Classname' = & gt; 'LitLight Type', 'Jointable' = 'Gtc:' listing_types_categories', 'ForeignKey' => 'listing_type_id', 'associationforeignkey' = & gt; 'Category_ID', 'Unique' = & gt; Keep 'Keep' 'Terms' = & gt; '', 'fields' = & gt; '', 'Order' =>, '' Border ''> & # 39; & # 39;; ';', 'Offset' = & gt; '', 'Finder' = & gt; '',));
Array ([Category] => Array ([listing_type_id] => Array [0] => 2 [1] => 3) [parent_id] = Ad [Meta_desc] = & gt; Ad [status] => 1] [ID] => Advertising [Meta_title] => Ad [Meta_keyword] = & gt; Ad [Meta_desc] => )
bs_listing_types_categories table, am I wrong. help please!
bs_listing_types_categories
post_tatag id field Check it out. / P>
create tab 'post' (`id`int (11) no null auto_ignment,` name 'varchar (255) no tap, `body` text tap, primary key (` id`) ; Create the table `tag` (` id` int (11) null auto_interpret, create 'name' varchar (255) tap, primary key (`id`)); Create tab `posts_tags` (` post_id` int (11) No tap, `tag_ id` integer (11) tap, primary key (` post_id`, `tag_ id`));
Comments
Post a Comment