In the Model class, I overrode the getTableSchema and manually defined the foreign keys like so:
```
public function getTableSchema()
{
\$table = parent::getTableSchema();

\$table->columns['sid']->isForeignKey = true;
\$table->foreignKeys['sid'] = array('Click', 'm_sid');

return \$table;
}
```

And in the corresponding table:
```
public function getTableSchema()
{
\$table = parent::getTableSchema();

\$table->columns['m_sid']->isForeignKey = true;
\$table->foreignKeys['m_sid'] = array('Message', 'sid');

return \$table;
}
```

Now the standard relation definitions work directly!
```
'clicks'=>array( self::HAS_MANY, 'Click', 'm_sid' ),
```

as well as
```
'message'=>array( self::BELONGS_TO, 'Message', 'sid'),
```