Hi please disregard my last post. I found the answers at http://book.cakephp.org/view/78/Associations-Linking-Models-Together Thanks :)
On Aug 11, 2:47 pm, Rawna <[email protected]> wrote: > Do I need to set foreign keys (author_id, book_id) to the tables > (books, authors)? How do I make my views have multiple selection > fields and how do I store them (because they're in an array)? > > On Aug 7, 10:15 am, Robert P <[email protected]> wrote: > > > Well, if Books can have more than one Author in your system then it's: > > Authors hasAndBelongsToMany Books > > Books hasAndBelongsToMany Authors > > > But if each book can only have one Author then it would be: > > Authors hasMany Books > > Book belongsTo Author > > > with the foreign keys set up as required. > > > Please read the Cookbook > > -http://book.cakephp.org/view/78/Associations-Linking-Models-Together > > > On Aug 7, 8:29 am,Rawna<[email protected]> wrote: > > > > On Aug 7, 2:48 am, Vijay Kumbhar <[email protected]> wrote: > > > > > Better way please create new table that will take the book_id & the > > > > auther_id so that you can associate the models. > > > > What Model relationship should I do to create that? Could you please > > > give an example? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
