Presumably you are using hibernate’s automatic annotation, and there is a one-to-many, many-to-one relationship in it, which requires you to annotate unwanted fields with @jsonignore,
This will ignore the @jsonignore field when the list is passed to json