Hell yeah it worked
Am I stupid or what??
Thanks for help. Its ok now.
On 12 Gru, 13:05, Zwift <[EMAIL PROTECTED]> wrote:
> I've noticed another thing
> I set my models property to recursive = 2
> but when I echo $model->recursive inside dbo_source read method
> its
No sorry again, my mistake
damn...
I don't know what to do
On 12 Gru, 13:05, Zwift <[EMAIL PROTECTED]> wrote:
> I've noticed another thing
> I set my models property to recursive = 2
> but when I echo $model->recursive inside dbo_source read method
> its equal 0
&
uestion one why its equal 0 ??
On 12 Gru, 12:20, Zwift <[EMAIL PROTECTED]> wrote:
> And the problem with many selects occured probably because I've added
> those uses I guess I should not
>
> On 12 Gru, 12:16, Zwift <[EMAIL PROTECTED]> wrote:
>
> > Your example
And the problem with many selects occured probably because I've added
those uses I guess I should not
On 12 Gru, 12:16, Zwift <[EMAIL PROTECTED]> wrote:
> Your example used only hasOne associacion, but I want to have also
> back associacion belongsTo
> I just noticed that
or the correct revision and update your version, and you
> shouldn't have this issue.
>
> On Dec 12, 10:16 am, Zwift <[EMAIL PROTECTED]> wrote:
>
> > Thanks.
> > After more investigation I found out that bake didn't add uses
> > LocalNumber to LocalA
unt`.`user_id`,
`LocalAccount`.`local_number` FROM `local_accounts` AS `LocalAccount`
WHERE `LocalAccount`.`local_number` = '10003'
SELECT `LocalAccount`.`id`, `LocalAccount`.`user_id`,
`LocalAccount`.`local_number` FROM `local_accounts` AS `LocalAccount`
WHERE `LocalAccount`.`local_number` = '10
; dbconfig to the config file under a different key.
>
> Code + SQL here :http://openpaste.org/en/4255/
>
> (I always have a 'playground' cake app setup on my local machine for
> various testing and experimentation)
>
> On Dec 11, 1:38 pm, Zwift <[EMAIL PROTECTED]&
han
> one db config for the same app so far) and it works fine, even without
> the external bit.
>
> It seems completely transparent, and it's only seeing the sql logs
> that you realise it does a separate query, not a join, for the
> external association.
>
> On D
After some researching I just need to know - is it even possible???
Many people (on IRC) says: yes, sure
But hell I cannot make it work even with simples User <-> Profile
associacion (from tempdocs)
On 11 Gru, 11:56, Zwift <[EMAIL PROTECTED]> wrote:
> I think nothttp://api.
I think not
http://api.cakephp.org/1.2/libs_2model_2model_8php-source.html (from
line 260)
On 11 Gru, 11:44, grigri <[EMAIL PROTECTED]> wrote:
> If your models are using different datasources you have to set the
> 'external' attribute in the association (I think).
>
&g
I've simplified it
/*
MODELS
*/
class LocalNumber extends AppModel {
var $useDbConfig = 'prepaid';
var $name = 'LocalNumber';
var $hasOne = 'LocalAccount';
}
class LocalAccount extends AppModel {
var $name = 'LocalAccount';
var $belongsTo = array(
2 Models
FIRST:
class LocalNumber extends AppModel {
var $useDbConfig = 'prepaid';
var $useTable = 'cards';
var $primaryKey = 'number';
var $displayField = 'number';
var $name = 'LocalNumber';
var $recursive = 2;
var $hasOne = array(
Problem is that I don't know how to set up DataSource, because I
cannot do associacion between two diferent databases using only
models, can I? there is no field for database config name in
associacion array.
I just read some information that datasources can make you do
assosciacions between files
Hello
I'm new here, but I was developing with cake for a while now. Now I'm
doing bigger project, and I need to work with 2 DBs - one of them is
"static" I cannot mess with its structure...
So is it possible to create associations between two different
databases?
I'm searching for some tutorial
14 matches
Mail list logo