jpql « Load « JPA Q&A





1. jpql don't load Blob    stackoverflow.com

@Entity
@NamedQueries({
    @NamedQuery(name = "Item.findAll", query = "select i from Item i"),
})
public class Item implements Serializable, WithId, WithNameDescription {
    @Lob
    byte[] photo;
  ...

2. Insert to JPA collection without loading it    stackoverflow.com

I'm currently using code like this to add a new entry to a set in my entity.

player = em.find(Player.class, playerId);
player.getAvatarAttributeOwnership().add(new AvatarAttributeOwnership(...));
It works, but every time I want to add one item, ...

3. How to eagerly load lazy fields with JPA 2.0?    stackoverflow.com

I have an entity class that has a lazy field like this:

@Entity
public Movie implements Serializable {
    ...
    @Basic(fetch = FetchType.LAZY)
    private String ...

4. Force lazy relation to load using JPQL    forums.netbeans.org

Hello all, Can I force a lazy to load using JPQL? Suppose I have two classes, Parent and Kid. Parent have many kids, and, normally, I don't want to load them ...