Skip to content

hasMany relationship with ObjectID #1617

Closed
@Marcuss57

Description

@Marcuss57

Hi all,

I know that there are already several tickets on this subject, but none of them answer concretely ...

I have a model "PermissionModule" that contains a hasMany to PermissionCategory.

In PermissionModule:

    public function categories()
    {
        return $this->hasMany('App\Model\Permission\PermissionCategory', 'fk_permission_module_id', '_id')
                    ->orderBy('code', 'asc');
    }

This relation returns nothing because fk_permission_module_id is an ObjectID. If I remove ObjectID, the relationship works fine.

@jenssegers Is it possible to have a maj as soon as possible or a solution to use this relationship appropriately.

Thx all for help,

Marc

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions