Can someone tell me if this would be the correct structure for database table names?
Everyone is a USER :which has (ID, name, password, email, group_id) USERS are broken up into 3 GROUPS (ID, name) So the USER then fits into one of the GROUPS below MANAGERS(id, user_id, name, .......) BUYERS (id, user_id, name, .......) SELLERS (id, user_id, name, .......) Now a SELLER would be selling ITEMS so when they make an ad is it using the USER_ID or SELLER_ID? or if a BUYER would be looking for ITEMS so when they make an ad is it using the USER_ID or BUYER_ID? Because if I used USER_ID would that not make it more difficult later when a SELLER and BUYER are in the same table? Just trying to figure out if everything should be associated to the USER ID or use the ID based on the group they belong to? Just like a PROFILE....USER can only have one and its either as a BUYER or SELLER. user model:: var $hasMany = array( 'Manager' => array('className' => 'Manager', 'foreignKey' => 'user_id', ), 'Buyer' => array('className' => 'Buyer', 'foreignKey' => 'user_id', ), 'Seller' => array('className' => 'Seller', 'foreignKey' => 'user_id', ) ); But that is not right either is it? Because the user only hasOne. Cant be a buyer and a seller. Can someone point out my error in thinking. --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---