Skip to content

hasMany relationship with ObjectID #1617

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Marcuss57 opened this issue Sep 30, 2018 · 1 comment
Closed

hasMany relationship with ObjectID #1617

Marcuss57 opened this issue Sep 30, 2018 · 1 comment

Comments

@Marcuss57
Copy link

Marcuss57 commented Sep 30, 2018

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

@Marcuss57 Marcuss57 changed the title hasMany relationShip with ObjectID hasMany relationship with ObjectID Sep 30, 2018
@xiaozhuai
Copy link

xiaozhuai commented Oct 16, 2018

Hey, bro. @Marcuss57
Did you solved this problem?
I also face the same thing.

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

No branches or pull requests

3 participants