Wednesday, April 29, 2009

model::read - restrict fields in HABTM objects

Hi all,

I have a model ('Facility) that has a HABTM relationship with
another ('ContentImage'). When I call read on an instance of Facility
it brings back details of related ContentImages. I would like to
exclude a field in all of the ContentImages (a field called 'data' - a
blob containing image data) in a certain instance.

Am I able to do this? I can see how you can pass a list of required
fields to read, but I can't figure out the syntax for doing this for
the HABTM model retrieved.

Any help much appreciated,

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

No comments: