Global way to set Lazy-loading fetch functionality for all the fields

#1

Hi,

for cascading persist, I have 3 choices:

- Either locally (@OneToOne(cascade=CascadeType.PERSIST))

- Either at objectdb level (<cascade-persist always="auto" on-persist="false" on-commit="true" />)

- Either at JPA global level (orm.xml).

 

For defining fetch policy, I know the local way to do it (@ManyToOne(fetch=FetchType.LAZY)).

Is there any way to do it at objectdb level or JPA global level?

 

(This functionality is very useful, it is a shame if neither objectdb nor JPA offers it).

#2

Lazy / Eager can only be set locally per relationship, and for some extent also per query (using JOIN FETCH).

ObjectDB Support

Reply