|
From: Diego P. P. (JIRA) <no...@at...> - 2006-07-23 17:13:15
|
OneToOne ignoring FetchType.LAZY
--------------------------------
Key: ANN-398
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-398
Project: Hibernate Annotations
Type: Bug
Components: binder
Versions: 3.2.0.cr1
Reporter: Diego Pires Plentz
Priority: Blocker
With annotation OneToOne, Hibernate is ignoring FetchType.LAZY
@Entity
@Table(name = "estudante", schema = "ingres", uniqueConstraints = {})
public class Estudante implements java.io.Serializable {
private Integer cdEstudante;
private EstEnderecoPais estEnderecoPais;
// Property accessors
@Id
@Column(name = "cd_estudante", unique = true, nullable = true, insertable = true, updatable = true)
public Integer getCdEstudante() {
return this.cdEstudante;
}
public void setCdEstudante(Integer cdEstudante) {
this.cdEstudante = cdEstudante;
}
@OneToOne(cascade = {CascadeType.ALL}, fetch = FetchType.LAZY)
@PrimaryKeyJoinColumn
public EstEnderecoPais getEstEnderecoPais() {
return this.estEnderecoPais;
}
public void setEstEnderecoPais(EstEnderecoPais estEnderecoPais) {
this.estEnderecoPais = estEnderecoPais;
}
}
************
@Entity
@Table(name = "est_endereco_pais", schema = "ingres", uniqueConstraints = {})
public class EstEnderecoPais implements java.io.Serializable {
private Integer cdEstudante;
private Estudante estudante;
@Id
@Column(name = "cd_estudante", unique = true, nullable = false, insertable = true, updatable = true)
public Integer getCdEstudante() {
return this.cdEstudante;
}
public void setCdEstudante(Integer cdEstudante) {
this.cdEstudante = cdEstudante;
}
@OneToOne(cascade = {}, fetch = FetchType.LAZY)
@PrimaryKeyJoinColumn
public Estudante getEstudante() {
return this.estudante;
}
public void setEstudante(Estudante estudante) {
this.estudante = estudante;
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
|