Skip to content

Never ending recursion #113

Description

@rajatkj

Suppose if there is a Parent which has children array inside it and those children also has a children array in It... and so on. This will end when a child doesn't have any more children.

I create a mapping Function for creating a representation and In core DB I have a to many relationship from children to children.

That method that creates a representation i.e. FEMapping for mapping that data.

func parentMapper() -> FEMMapping {

        let mapping = FEMMapping(entityName: “Parent”)

        mapping.primaryKey = “id”

        mapping.addAttributes(from: [“key”, "id", “value”])

        mapping.addToManyRelationshipMapping(parentMapper(), forProperty: “children”, keyPath: “children”)
        return mapping

    }

This mapping function is recursive and never ends.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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