LazyInitializationException when using ElementCollection in Play framework

前端 未结 4 921
粉色の甜心
粉色の甜心 2021-01-18 16:03

I have an User entity in my applications set of models that is defined as follows:

public class User extends Model {

    private String name;

    private b         


        
4条回答
  •  旧巷少年郎
    2021-01-18 16:43

    Yes, you should use EAGER annotation, but be careful because, as JB Nizet says, those elements will be always eagerly loaded.

提交回复
热议问题