Skip to content

Relations names should not be mandatory to match resource table #37

@rafinskipg

Description

@rafinskipg
corbelDriver.resources
    .relation('resourceName', sourceId, 'relationName')
   .add(null, data);

That would create a relation called 'resourceName_relationName'.

Instead of this, the relation created should be relationName. And if you want to use a different resource for the relation:

corbelDriver.resources
    .relation('resourceName', sourceId, 'relationName')
   .add(RESOURCE_ID, data);

Right now it is looking for another resource called relationName for finding that RESOURCE_ID.
Instead of this add another param, resourcesDest or something like that

corbelDriver.resources
    .relation('resourceName', sourceId, 'relationName', 'resourceNameDestination`)
   .add(RESOURCE_ID, data);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions