Struts2 JSON Plugin not working with “lazy” data
问题 I have an Entity with a OneToOne relation that is fetched lazily: @Entity public class Person { @Id private Integer id; @Column(length=60) private String address; @OneToOne(fetch=FetchType.LAZY) @JoinColumn(name="idProvince") private Province province; } This is the test I do, trying to get all the entities and to serialize them as JSON, using the JSONUtil class in JSONPlugin (the 'official' json plugin for Struts 2): List<Person> people = personService.findAll(); String result = JSONUtil