Skip to content

Relation isn't showing #8

Description

@kealsera

I wrote this condition:

{ "fillable": "id", "relation": [{ "name": "team", "fillable": "title" }]}

where my model is created like this:

QueryModel

 public $belongsTo = [
            'team' => [
                'Rikki\Heroeslounge\Models\Team',
                'key' => 'team_id',
                'otherKey' => 'id'
            ],
            'user' => ['RainLab\User\Models\User'],
            'role' => [
        'Rikki\Heroeslounge\Models\SlothRole'
        ]
        ];

Relation Model


  public $hasMany = [
            'sloths' => ['Rikki\Heroeslounge\Models\Sloth', 'order' => 'is_captain desc'],
            'apps' => ['Rikki\Heroeslounge\Models\Apps']
            ];

But the resulting query only shows null.

what am I doing wrong here?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions