ObjectDB ObjectDB

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.

edit
delete
#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
edit
delete

Reply

To post on this website please sign in.