Skip to content

Circular referenced types will take forever to populate #1

@engtecmat

Description

@engtecmat

Hi there, I really like these features of the library.

I hope it can support that two objects depend on each other.
When I have the following code, my program always creates objects till it eats all memory from my computer.

public class Course {
  
   Set<Student> students;
   
}
public class Student {

  Set<Course> courses;

}

Is the allowEmpty of the annotation Field a solution. I’m sure I use it correctly, but it doesn't work.

@Model(type = Student.class, fields = {@Field(name = "courses", allowEmpty = true)})
public class StudentConfig {
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions