Skip to content

Workbench memory overload with "recursive" relations #64

@lincoyanpalma

Description

@lincoyanpalma

Im sorry if i can't get a better description for the title, but i will try to explain this the best i can:

When a child entity has another child, and this last one has a child that is the parent of the first one, workbench begins to consume memory incrementally, just like a recursion problem (at least to me), but here is the thing:

first, i'm going to describe the models by following laravel's conventions:

  • Role:
    • has many users
    • belongs to many access rules
    • belongs to one institution
  • User:
    • has many institutions
    • belongs to one role
  • Institution:
    • has many roles
    • belongs to one user

Here a screenshot for reference:
Captura de pantalla 2019-04-15 a la(s) 20 10 40

Everything goes fine If i remove this FK:
Captura de pantalla 2019-04-15 a la(s) 20 13 03

or this one:
Captura de pantalla 2019-04-15 a la(s) 20 14 25

or this one:
Captura de pantalla 2019-04-15 a la(s) 20 14 55

But if i keep all this relations, the problem occurs when i click on "Tools->Catalog->Export Laravel 5 Migration" menu.

My env:
OS: MacOS High Sierra
Macbook Pro Retina 15 mid 2015
Workbench: 8.0.15 (same results in version 6)
Plugin version: current Master Branch (0.1.15)

Ref. Workbench file for testing:
recursive_relations_err.mwb.zip

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