Ita wrote:
> Hi,
> In my DB I have 3 tables
> objects, users & votes

You are going to have problems with a model class named 'Object' since
it already exists - you need to choose a different  name.

regarding the check, as I'm here, simply use your associations:

if ($this->Vote->Thing->hasAny(array('Thing.name'=>$objectName)) {
// cast vote.
}

hth,

AD


--~--~---------~--~----~------------~-------~--~----~
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