Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 19th, 2010 | Syntax: None | Size: 1.01 KB | Hits: 89 | Expires: Never
Copy text to clipboard
  1. $q = Doctrine_Query::create()
  2.         ->from('CoopItemSeen seen')
  3.         ->leftJoin('seen.Items items')
  4.         ->where('seen.user_id = ?', $this->getUser()->getGuardUser()->getId() );
  5. $seens = $q->execute();
  6.  
  7.  
  8. CoopSvnItem:
  9.   actAs:
  10.     Timestampable: ~
  11.   columns:
  12.     id:                                         { type: integer(4), primary: true, notnull: true, autoincrement: true}
  13.     svn_id:                     { type: integer(4), notnull: true }
  14.     path:                                       { type: string(255), notnull: true }
  15.     last_rev:           { type: integer(64)}
  16.   relations:
  17.     CoopSvn:            { onDelete: CASCADE, local: svn_id, foreign: id, foreignAlias: Svns }
  18.  
  19. CoopItemSeen:
  20.   actAs:
  21.     Timestampable: ~
  22.   columns:
  23.     svn_item_id:  { type: integer(4), notnull: true }
  24.     user_id:            { type: integer(4), notnull: true }
  25.     status:       { type: integer(4)}
  26.     rev:                { type: integer(4)}
  27.   relations:
  28.     sfGuardUser:  { onDelete: CASCADE, local: user_id, foreign: id, foreignAlias: Users }
  29.     CoopSvnItem:  { onDelete: CASCADE, local: svn_item_id, foreign: id, foreignAlias: Items }