Is there a way to set EAGER fetch on all "ToMany" collection relationships

#1

Given that the default seems to be FetchType.LAZY for all collections @OneToMany and @ManyToMany.

Such as a configuration option.

Instead of having to explicitly set fetch in annotation code in every relationship.

#2

No. There is no such configuration option, since having EAGER as the fetch type of all relationships may cause loading the entire database into memory if all the objects are reachable from some root that you load.

ObjectDB Support

Reply