i wouldn't say that vijay was incorrect - he ment the same thing, just didn't express it as clear as you, miles :)
either way it is way cleaner to normalize the database - this way you have more control over the multiple choices and if you delete one "choice", you can make sure it is not related to any record (with your arrays as serialized string this is not a nice thing to do) On 7 Aug., 04:15, 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 -~----------~----~----~----~------~----~------~--~---
