I think that you can't map this to any cake relationship (bakers,
please correct me if I'm wrong). But you can add a afterFind callback
to your model to fetch the image data, or use a custom query and JOIN
both tables.

If you want to use the automagic on cakephp, I suggest you use a
HABTM:

products:
- id
- stuff

images:
id
path
etc

image_product:
- image_id
- product_id


HTH,

- Dardo.


On Oct 8, 3:29 am, Adwin  Wijaya <[EMAIL PROTECTED]> wrote:
> you can add product_id so that the image only belongs to the one
> product.
>
> Btw, how about to combine the product and image into one table ?
> I used to make as one table instead of doing one on one relationship.
> (less query .. i think)
> cmiiw
>
> adwinwww.wysmedia.com


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to