Example usage for javax.persistence FetchType EAGER

List of usage examples for javax.persistence FetchType EAGER

Introduction

In this page you can find the example usage for javax.persistence FetchType EAGER.

Prototype

FetchType EAGER

To view the source code for javax.persistence FetchType EAGER.

Click Source Link

Document

Defines that data must be eagerly fetched.

Usage

From source file:com.school.exam.entity.Answer.java

@ManyToOne(fetch = FetchType.EAGER, targetEntity = User.class)
@JoinColumn(name = "user_id", referencedColumnName = "id")
public User getUser() {
    return user;/*from   w ww.  j  a va2  s.c  o m*/
}

From source file:mx.ecosur.multigame.manantiales.entity.PuzzleSuggestion.java

@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
public ManantialesMove getMove() {
    return move;
}

From source file:com.school.exam.entity.User.java

@ManyToOne(fetch = FetchType.EAGER, targetEntity = SSClassVO.class)
@JoinColumn(name = "class_id", referencedColumnName = "id")
public SSClassVO getSsClass() {
    return ssClass;
}

From source file:gt.entities.UserProfile.java

@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "idProfile", referencedColumnName = "idProfile", nullable = false)
public Profile getProfile() {
    return profile;
}

From source file:de.iew.framework.domain.principals.Authority.java

@DSTitleProperty
@OneToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
@JoinColumn(name = "display_name_id")
public TextItemCollection getDisplayName() {
    return displayName;
}

From source file:com.testing26thjuly_.wmstudio.Table29.java

@JsonIgnoreProperties({ "table29ByColumn3", "table29sForColumn3" })
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "`COLUMN3`", referencedColumnName = "`ID`", insertable = true, updatable = true)
public Table29 getTable29ByColumn3() {
    return this.table29ByColumn3;
}

From source file:org.bwgz.swim.openlane.spring.model.OpenLaneUser.java

@OneToMany(cascade = CascadeType.ALL, targetEntity = OpenLaneAuthority.class, mappedBy = "username", fetch = FetchType.EAGER)
public Collection<GrantedAuthority> getAuthorities() {
    return authorities;
}

From source file:ca.mcgill.cs.swevo.qualyzer.model.Fragment.java

/**
 * @return/*from w w  w .j a  v  a2 s . c  o  m*/
 */
@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.EAGER)
@CollectionId(columns = @Column(name = "COL_ID"), type = @Type(type = "string"), generator = "uuid-gen")
public List<Annotation> getAnnotations() {
    return fAnnotations;
}

From source file:com.melayer.camzia.domain.MeUser.java

@JsonIgnore
@ManyToMany(fetch = FetchType.EAGER)
@JoinTable(name = "user_role", joinColumns = { @JoinColumn(name = "id_user") }, inverseJoinColumns = {
        @JoinColumn(name = "id_role") })
public Set<MeRole> getRoles() {
    return roles;
}

From source file:gt.entities.UserProfile.java

@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "idUser", referencedColumnName = "idUser", nullable = false)
public User getUser() {
    return user;
}