mysql - CakePHP, injects "LEFT JOIN" (mentioning fields in an associated model) into my update attempts -


This is driving me crazy, I'm trying to do this:

  $ This - & gt; Data = $ this- & gt; Proxy-> Read ('Proxy', $ currentgetdata); $ This- & gt; Data ['prox'] ['check'] = 2; $ This- & gt; Prox-> Save ();  

Where I have an ideal union:

  class Prox AppModel {var $ name = 'Prox'; Var $ primaryKey = 'id'; ######## Define Model Associations ######## var $ belongsTo = array ('Proxylink' => array ('className' => gt; proxycink ')); }  

But I get an error:

  select 'Proxy'. Exclude Proxy from Proxy as ProxyLinks 'Proxy Silenc` (`Prox` .` Proxilink_ID` =` Proxy Silenc`````````````) where' Proxy `.`````````58 .22.101.239: 808 'Sirius 1 1054: Unknown column' ProxyBoxilink_ID 'on the clause  

I can not find why it is put in the query Given "LEFT JOIN proxylinks AS Proxylink ON ( proxy . proxylink_id = proxylink . id ) "and why I am doing this but no documents are available, as it is a non-existent hybrid of an area with my connected model and every current on my query Trying to incorporate the model, which I find extremely bizarre .. What can I do to amend my advice / update questions to do the work. If you have an association, you must have the 'proxylink_id' field in your 'Proxy' table.

If you do not want to do ashock, you have to set the '' option to -1 ' to join the betetty models.


Comments