@ManyToOne(fetch=FetchType.LAZY)...B也是如此(@onetomany for A in B)。这是一种双向关系。当为实体A调用web服务时,它在响应json中提供到B实体的链接,而不是整个对象。我希望整个对象在web服务响应JSON中,而不是链接到相关实体。我该怎么做呢?我使用了springboot + springdatajpa + hibernate作为jpa提供者+ sprin
在Spring Boot应用程序中,同一个表有两个实体。// specific @OneToMany and @OneToOne relations only present in this entity@Table(name仅用于数据搜索,并始终在单独的API中使用。问题是,hibernate在使用JPA SessionImpl - HHH000487: The query: [here