I am doing a HABTM join between a page table and a section table. The
code is:
var $hasAndBelongsToMany = array('Section' =>
array('className' => 'Section',
'joinTable' => 'INT_CONF_PAGE_SECTION',
'foreignKey' => 'page_id',
'associationForeignKey'=> 'section_id',
'conditions' => '',
'order' => '',
'limit' => '',
'uniq' => true,
'finderSql' => '',
'deleteQuery'=> '',
)
);
This returns the SQL:
SELECT Section.ID, Section.ACCOUNT_ID, Section.NAME, Section.STANDARD,
Section.VISIBLE, Section.CREATED_ON, Section.MODIFIED_ON,
Section.DISPLAY_NAME FROM INT_CONF_SECTION Section JOIN
INT_CONF_PAGE_SECTION ON INT_CONF_PAGE_SECTION.page_id='' AND
INT_CONF_PAGE_SECTION.section_id = Section.id WHERE 1 = 1
I cannot figure out why the first JOIN condition has an empty quote -->
INT_CONF_PAGE_SECTION.page_id='' <-- and why the joined table is not in
the SQL (I believe it should be, right?)
I am running Cake v1.0.1.2708.
X-Google-Language: ENGLISH,ASCII-7-bit
Received: by 10.11.53.63 with SMTP id b63mr135050cwa;
Mon, 22 May 2006 13:29:59 -0700 (PDT)
X-Google-Token: LejT3QwAAADYGPmaESE0V_Skrx1Jjcf8
Received: from 12.163.39.254 by j73g2000cwa.googlegroups.com with HTTP;
Mon, 22 May 2006 20:29:59 +0000 (UTC)
From: "Dave Rogers" <[EMAIL PROTECTED]>
To: "Cake PHP" <[email protected]>
Subject: More HABTM Funkiness
Date: Mon, 22 May 2006 20:29:59 -0000
Message-ID: <[EMAIL PROTECTED]>
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8)
Gecko/20051111 Firefox/1.5.0.1,gzip(gfe),gzip(gfe)
Mime-Version: 1.0
Content-Type: text/plain
I am doing a HABTM join between a page table and a section table. The
code is:
var $hasAndBelongsToMany = array('Section' =>
array('className' => 'Section',
'joinTable' => 'INT_CONF_PAGE_SECTION',
'foreignKey' => 'page_id',
'associationForeignKey'=> 'section_id',
'conditions' => '',
'order' => '',
'limit' => '',
'uniq' => true,
'finderSql' => '',
'deleteQuery'=> '',
)
);
This returns the SQL:
SELECT Section.ID, Section.ACCOUNT_ID, Section.NAME, Section.STANDARD,
Section.VISIBLE, Section.CREATED_ON, Section.MODIFIED_ON,
Section.DISPLAY_NAME FROM INT_CONF_SECTION Section JOIN
INT_CONF_PAGE_SECTION ON INT_CONF_PAGE_SECTION.page_id='' AND
INT_CONF_PAGE_SECTION.section_id = Section.id WHERE 1 = 1
I cannot figure out why the first JOIN condition has an empty quote -->
INT_CONF_PAGE_SECTION.page_id='' <-- and why the joined table is not in
the SQL (I believe it should be, right?)
I am running Cake v1.0.1.2708.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---