Skip to content

Relation hasMany will not work  #1902

Open
@inkvc17

Description

@inkvc17

Hi,
I am a MongoDB rookie and need your help.
I have 2 simple models:

Model merchant
Bildschirmfoto 2020-01-05 um 21 03 27

Controller
Bildschirmfoto 2020-01-05 um 21 04 47

collection merchants
Bildschirmfoto 2020-01-05 um 20 58 36

collection comments
Bildschirmfoto 2020-01-05 um 20 58 44

If I only want to query the merchant, I don't have any problems, but if I want to use hasMany (relation to comments) it will not work

Illuminate\Database\Eloquent\Collection {#371
#items: []
}

Hope you can help me - many thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs investigationNeed investigation about bugs described in issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions