I'm not sure about the wierd table and id names, but it's perfectly
possible to assign a primary key as a foreign key too, without relying
on Model::query():
table: products [id, ...]
table: product_descriptions [id, ...]
class Product extends AppModel {
var $name = "Product";
var $hasOne =
Ok that works fine, thank you for your effort, i'll just remember in
the future that advanced model integrations with preexisting tables
will have to be done manually.
--Alex
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
On 9/19/07, axpen <[EMAIL PROTECTED]> wrote:
>
> Ok then in that case what is the equivalent of $this->query from model
> in the controller class, or do I have to call $model->query or
> something
>
> Thanks for you help
It's usually $this->Model->query(...) from the controller if you've
added th
Ok then in that case what is the equivalent of $this->query from model
in the controller class, or do I have to call $model->query or
something
Thanks for you help
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ca
On 9/19/07, axpen <[EMAIL PROTECTED]> wrote:
>
> Yeah I know about the foreign key thing, but that would still require
> that I add an ID field to the description table, which I want to avoid
> mucking with zencarts default database structure.
No 'id field', no ability to use the built-in associa
Yeah I know about the foreign key thing, but that would still require
that I add an ID field to the description table, which I want to avoid
mucking with zencarts default database structure. I would make a
belongsToAndHasMany table, but that would seem silly since all the
values would be the same
On 9/19/07, axpen <[EMAIL PROTECTED]> wrote:
> ---
> Basically I want to get the description field from into the products
> model from the model component. That way I can work with it from the
> controller component. Now if you guys know of a standard way this is
> supposed to be d
Ok my question is this. How do you associate a record from a table
without an ID tie-in. I.E. i'm developing a zencart add-on and
basically there is the following map I want to relate;
products (
products_id #main ID field
... #other fields
)
products_description ( #i've already used $useTabl