Re: Database associations

2010-07-09 Thread grigri
This should work: class Contact extends AppModel { var $hasMany = array( 'Call' = array( 'foreignKey' = false, 'conditions' = array( 'Call.number = Contact.number' ) ) ); } hth grigri On Jul 9, 12:06 am, Justin Beeler jrble...@gmail.com wrote: I'm working

Database associations

2010-07-08 Thread Justin Beeler
I'm working with two tables: Contacts and Calls. I want to join the calls with the contacts on a field called number (the phone number). Is there not a way in cake to manually join tables and not have it join on a field like [model]_id ? If you need any further details, let me know. Check out

Re: Database associations

2010-07-08 Thread Jeremy Burns | Class Outfit
You can use the join statement: http://book.cakephp.org/view/1047/Joining-tables )although it's not ideal). Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 9 Jul 2010, at 00:06, Justin Beeler wrote: I'm working with two tables: Contacts and Calls. I

Re: Database Associations Not Linking Up

2009-05-14 Thread daoustm...@gmail.com
...@gmail.com wrote: Can you post the code you are using to retrieve and display the data? On May 12, 3:17 pm, Site Reference daoustm...@gmail.com wrote: Hey all, I apologize if this is a bit of a newbie question, but I am having trouble getting my database associations to link up...here

Re: Database Associations Not Linking Up

2009-05-13 Thread andy
Can you post the code you are using to retrieve and display the data? On May 12, 3:17 pm, Site Reference daoustm...@gmail.com wrote: Hey all, I apologize if this is a bit of a newbie question, but I am having trouble getting my database associations to link up...here is what I have: MySQL

Database Associations Not Linking Up

2009-05-12 Thread Site Reference
Hey all, I apologize if this is a bit of a newbie question, but I am having trouble getting my database associations to link up...here is what I have: MySQL Tables CREATE TABLE phones ( id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, profile_id INTEGER UNSIGNED NULL, phone VARCHAR(255) NULL