Skip to content

[FieldFactory] Handle *to many* references #11

@lutangar

Description

@lutangar

The FieldFactory does'nt support to many references.
ReferenceManyField should be used instead of a ReferenceField.

Apparently, there is no facts in a doc to disguinsh a property referencing many resources from a property referencing only one resource.

Still, the plural form of a property name could be detected, but that would still be a wild guess...

Another approach would be a higher order component which will choose between a ReferenceField and a ReferenceManyField once populated by data: the data would be an array or not.

But this feels dodgy as well, there must be a way to find the right field before data population.

What's your toughts on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions