cancel
Showing results for 
Search instead for 
Did you mean: 

JPA - lazy loading for LOB field

former_member190457
Contributor
0 Kudos

Hi all,

JPA 1.0 specification mandates that all JPA-compliant implementation support lazy loading for certain kind of entity field.

For LOB fields lazy loading is OPTIONAL.

I am experiencing odd runtime behaviors on my custom software which would point to this feature not being supported.

Can anyone please tell me if SAP JPA 1.0 implementation on NW CE 711 implements this feature or not?

Thanks in advance

Regards

Vincenzo

Accepted Solutions (1)

Accepted Solutions (1)

rolf_paulsen
Active Participant
0 Kudos

Hi Vincenco,

I am sure that this is the same as with single-valued relationships (@OneToOne, @ManyToOne): Lazy loading would require bytecode manipulation/generation, so SAP JPA does not support it in 7.20 (and of course not in 7.11)

See 's elaborate answer here: .

In 7.30 enhancements, you really can find lazy loading support for single-valued relationships with getReference.

http://help.sap.com/saphelp_nw73/helpdata/en/68/f676ef36094f4381467a308a98fd2a/content.htm

but @Lob and @Basic is not mentioned.

If you need lazy loading in 7.11, you have two alternatives:

1. Put the Lob fields into separate entities, work around the missing feature in SAP JPA with ugly @OneToMany - Relations

2. Use another persistence provider like EclipseLink, read Sabine Heider's blogs about integrattion of EclipseLink in SAP NetWeaver and static bytecode weaving for lazy loading. /people/sabine.heider/blog

Regards

Rolf

Answers (0)