Details
-
Type:
Sub-task
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Invalid
-
Affects Version/s: 1.2.2
-
Fix Version/s: None
-
Component/s: Record, Relations, Schema Files
-
Labels:None
-
Environment:Symfony 1.4.6-DEV
Description
I want to bookmark ads on my site. So i have Ads table, users table (sfDoctrineGuard) and a refclass Bookmarks. I've created an ajax link to an action, where i retrieved $ad object, $user_id and
$ad->link('Bookmarks', $user_id, true);
So I expected a record in a database to be created.
Bookmarks:
...
columns:
user_id:
ad_id:
{ type: integer(4), primary: true } relations:
sfGuardUser:
Ads:
{ onDelete: CASCADE, local: ad_id, foreign: ad_id }As my Bookmarks table has 2 primary keys in the link method
if (count($ids) > 0)
{ $q->whereIn($rel->getTable()->getIdentifier(), array_values($this->identifier())); }$rel->getTable()->getIdentifier() returned me an array('user_id', 'ad_id') instead of a string. So the query which was generated looked like
UPDATE bookmarks SET ad_id = ? WHERE (Array IN
)
And Array is not the name of a column.