Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorkkrzyzak
    I've got two models: Club and Match.
    In Match model I've got away_id and home_id.
    I would like in view make sth. like this:
    {loop Matches}
    Home: {Match.home.name} <-- displays home club name
    Away: {Match.away.name} <-- displays away club name

    however, I've no idea, how to implement that.
    var $belongs_to = array('club'=>array('primary_key_name'=>'away_id'),'club'=>array('primary_key_name'=>'home_id') ); in match model ?
    Any hints will be greatly appreciated
    Sorry for my language errors - English isn't my native lang.
    • CommentAuthorarnoschn
    try this:

    var $belongs_to = array(
    • CommentAuthorkkrzyzak
    thanks, it works!