Apparent unwanted query caching when using $this->query in a Model.

2007-04-24 Thread RayChicago
Hello everyone ! My intentions: - to get a (kind of) sequence nr for naming an object - (maybe) save someone a headache My (first) approach was to use the function "query()" in the Model like so: *snip* function getNextSeqNr() { $seqnr = $this->query("SELECT (MAX(Item.id)+1) AS seqnr F

Re: cake searches the HATBM join table in the wrong database when using $useDbConfig

2007-04-01 Thread RayChicago
hi again ^3 ! after struggling/searching for two days i finally came across this one : http://groups.google.at/group/cake-php/browse_thread/thread/b8816db7ff5854bc/12598076103b0130?lnk=gst&q=3+HABTM&rnum=2#12598076103b0130 which IMHO should be added to the cake-manual, section model, paragraph "

Re: cake searches the HATBM join table in the wrong database when using $useDbConfig

2007-03-30 Thread RayChicago
hi again ! i tried giving different credentials to the two db-configs (different username/pw) and i also tried switching to mysql_connect... none of this has helped so far... i'm still at a kind of loss... cheers, ray --~--~-~--~~~---~--~~ You received this mes

Re: cake searches the HATBM join table in the wrong database when using $useDbConfig

2007-03-30 Thread RayChicago
i just tried these additional things : - gave the config different user-credentials (usernam/pw) - switched to mysql_connect ... and i'm still none the wiser :( cheers, ray --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

cake searches the HATBM join table in the wrong database when using $useDbConfig

2007-03-30 Thread RayChicago
Hi all ! My (unfortunate) Situation : I have a Model X in one Database D1, and a Model Y in a Database D2, a HABTM relationship between them like outlined below, and the jointable x_y is in D2. class X extends AppModel { public $name = "X"; public $useTable = 'xtable'; public $useDbConfig

Re: overwriting loadInfo() in Model to get rid of unwanted columns

2007-03-20 Thread RayChicago
> If you are using CakePHP 1.2 default values for fields will be auto > populated before saving record. I'd very much like to use version 1.2 (behaviours, ... mhm. yummy), although (no offense) I have had _really_ bad experiences with "bleeding edge" branches before, so I will wait until all of th

overwriting loadInfo() in Model to get rid of unwanted columns

2007-03-20 Thread RayChicago
Hi all ! I have a table from which I only need a subset of its actual columns. I overwrote loadInfo() in my Model, so that it only returns the needed subset. (I basically return a fixed array for the time being) this works as expected in scaffolding, and it works just because none of the fields I