ObjectDB ObjectDB

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


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.

--- Webel IT Australia, "The Elements of the Web", Specialists in model-based UML, SysML, Enterprise Java, XML, and Drupal CMS web engineering. Dr Darren Kelly, BSc, PhD, https://www.webel.com.au

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
ObjectDB - Fast Object Database for Java (JPA/JDO)


To post on this website please sign in.