Closed fokoz closed 5 years ago
6.1.3
9.1.0 and 6.4.1
Getting this error: E_CANNOT_OVERRIDE_RELATION: Trying to eagerload headChef relationship twice
E_CANNOT_OVERRIDE_RELATION: Trying to eagerload headChef relationship twice
When I try to fetch multiple with: await Kitchen.query().with('headChef').with('chef').fetch()
await Kitchen.query().with('headChef').with('chef').fetch()
both headChef() and chef() belongs to the same model App/Models/Chef but using different id (head_chef_id, chef_id)
headChef()
chef()
App/Models/Chef
head_chef_id, chef_id
Turn out it is a problem with the plugin https://github.com/enniel/adonis-lucid-polymorphic/issues/9
Package version
6.1.3
Node.js and npm version
9.1.0 and 6.4.1
Sample Code (to reproduce the issue)
Getting this error:
E_CANNOT_OVERRIDE_RELATION: Trying to eagerload headChef relationship twice
When I try to fetch multiple with:
await Kitchen.query().with('headChef').with('chef').fetch()
both
headChef()
andchef()
belongs to the same modelApp/Models/Chef
but using different id (head_chef_id, chef_id
)