users@glassfish.java.net

Re: entities - lazy loading for basic fields?

From: Markus Fuchs <Markus.Fuchs_at_Sun.COM>
Date: Fri, 23 Mar 2007 10:47:01 -0700

Hi demiant,

fetch=FetchType.LAZY can be used in combination with the @Basic
annotation, please see 9.1.8 of the JPA specification. Keep in mind that
this attribute is only a hint to the persistence provider, and can't be
enforced. Lazy loading is the default for many_at_many/one_at_many
relationships, but can be applied to all field types. You may also
consider using the @LOB annotation in your case.

-- markus.

glassfish_at_javadesktop.org wrote:
> Hi,
>
> I have an entity with a field that is a string field but may contain real big amount of data.
>
> Is there any way to lazily load such a field? or lazy loading is only relevant to many_at_many/one_at_many relationships?
>
>
> thanks
> [Message sent by forum member 'demiant' (demiant)]
>
> http://forums.java.net/jive/thread.jspa?messageID=209602
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>