Skip to content

Empty many to many relationships cause an exception #116

@johncarter-

Description

@johncarter-

When accessing empty model many to many relationships you get a SQLSTATE[HY000]: General error: 1 no such table: the_pivot_table_name exception.

How to replicate

  1. Clone https://github.com/johncarter-/laravel-orbit-many-to-many

  2. Switch to the issue/many-to-many-no-such-table branch.

  3. Run php artisan test --filter it_can_handle_empty_many_to_many_relationships tests/Feature/OrbitalManyToManyTest.php

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