Java Code Examples for javax.persistence.FetchType#LAZY

The following examples show how to use javax.persistence.FetchType#LAZY . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Empresa.java    From ponto-inteligente-api with MIT License 4 votes vote down vote up
@OneToMany(mappedBy = "empresa", fetch = FetchType.LAZY, cascade = CascadeType.ALL)
public List<Funcionario> getFuncionarios() {
	return funcionarios;
}
 
Example 2
Source File: AdmBasekeyCat.java    From we-cmdb with Apache License 2.0 4 votes vote down vote up
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "id_adm_basekey_cat_type", insertable = false, updatable = false)
public AdmBasekeyCatType getAdmBasekeyCatType() {
    return this.admBasekeyCatType;
}
 
Example 3
Source File: AdmBasekeyCat.java    From we-cmdb with Apache License 2.0 4 votes vote down vote up
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "group_type_id", insertable = false, updatable = false)
public AdmBasekeyCat getGroupBasekeyCat() {
    return this.groupBasekeyCat;
}
 
Example 4
Source File: Funcionario.java    From ponto-inteligente-api with MIT License 4 votes vote down vote up
@OneToMany(mappedBy = "funcionario", fetch = FetchType.LAZY, cascade = CascadeType.ALL)
public List<Lancamento> getLancamentos() {
	return lancamentos;
}
 
Example 5
Source File: AdmIntegrateTemplateRelation.java    From we-cmdb with Apache License 2.0 4 votes vote down vote up
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "child_alias_id")
public AdmIntegrateTemplateAlias getChildIntegrateTemplateAlias() {
    return this.childIntegrateTemplateAlias;
}
 
Example 6
Source File: Resource.java    From Exam-Online with Apache License 2.0 4 votes vote down vote up
@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, orphanRemoval = true)
@JoinColumn(name = "resource_id")
@OrderBy("good desc")
public List<ResourceComment> getComments() {
	return comments;
}
 
Example 7
Source File: ChooseLog.java    From Exam-Online with Apache License 2.0 4 votes vote down vote up
@ManyToMany(fetch=FetchType.LAZY)
@JoinTable(name = "choose_log_choice")
public List<Choice> getChoose() {
	return choose;
}
 
Example 8
Source File: BuyLog.java    From Exam-Online with Apache License 2.0 4 votes vote down vote up
@ManyToOne(fetch=FetchType.LAZY)
public SysUser getUser() {
	return user;
}
 
Example 9
Source File: AdmRoleUser.java    From we-cmdb with Apache License 2.0 4 votes vote down vote up
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "id_adm_role", insertable = false, updatable = false)
public AdmRole getAdmRole() {
    return this.admRole;
}
 
Example 10
Source File: AdmTemplate.java    From we-cmdb with Apache License 2.0 4 votes vote down vote up
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "id_adm_ci_type")
public AdmCiType getAdmCiType() {
    return this.admCiType;
}
 
Example 11
Source File: AdmRoleCiTypeCtrlAttr.java    From we-cmdb with Apache License 2.0 4 votes vote down vote up
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "id_adm_role_ci_type", insertable = false, updatable = false)
public AdmRoleCiType getAdmRoleCiType() {
    return this.admRoleCiType;
}
 
Example 12
Source File: Share.java    From aws-photosharing-example with Apache License 2.0 4 votes vote down vote up
@ManyToOne(fetch=FetchType.LAZY, optional=true)
public Album getAlbum() {return album;}
 
Example 13
Source File: PetOwner.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@OneToOne(optional = false, cascade = CascadeType.ALL, fetch = FetchType.LAZY, targetEntity = Pet.class)
@JoinColumn(nullable = false)
public PetProxy getPet() {
    return pet;
}
 
Example 14
Source File: AdmUserIntegrateTemplate.java    From we-cmdb with Apache License 2.0 4 votes vote down vote up
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "id_adm_user")
public AdmUser getAdmUser() {
    return this.admUser;
}
 
Example 15
Source File: AdmUserIntegrateTemplate.java    From we-cmdb with Apache License 2.0 4 votes vote down vote up
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "id_adm_integrate_template")
public AdmIntegrateTemplate getAdmIntegrateTemplate() {
    return this.admIntegrateTemplate;
}
 
Example 16
Source File: Question.java    From Exam-Online with Apache License 2.0 4 votes vote down vote up
@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, orphanRemoval = true)
@JoinColumn(name="question_id")
@OrderBy("good desc")
public List<QuestionComment> getComments() {
	return comments;
}
 
Example 17
Source File: ContentEnvironment.java    From uyuni with GNU General Public License v2.0 4 votes vote down vote up
/**
 * @return the nextEnvironment
 */
@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinColumn(name = "next_env_id")
protected ContentEnvironment getNextEnvironment() {
    return nextEnvironment;
}
 
Example 18
Source File: ImageBuildHistory.java    From uyuni with GNU General Public License v2.0 4 votes vote down vote up
/**
 * @return the repo digests
 */
@OneToMany(fetch = FetchType.LAZY, mappedBy = "buildHistory", cascade = CascadeType.ALL)
public Set<ImageRepoDigest> getRepoDigests() {
    return repoDigests;
}
 
Example 19
Source File: ExamPaper.java    From Exam-Online with Apache License 2.0 4 votes vote down vote up
@ManyToMany(fetch = FetchType.LAZY, cascade=CascadeType.PERSIST)
@JoinTable(name="exampaper_question")
@OrderBy("type")
public List<Question> getQuestions() {
	return questions;
}
 
Example 20
Source File: SUSEProductSCCRepository.java    From uyuni with GNU General Public License v2.0 4 votes vote down vote up
/**
 * @return Returns the root product.
 */
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "root_product_id", nullable = false)
public SUSEProduct getRootProduct() {
    return rootProduct;
}