Fixes Bug #0009248
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@70656 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
21525227e5
commit
23cf31c887
|
@ -16,6 +16,7 @@ import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.EnumType;
|
import javax.persistence.EnumType;
|
||||||
import javax.persistence.Enumerated;
|
import javax.persistence.Enumerated;
|
||||||
|
import javax.persistence.FetchType;
|
||||||
import javax.persistence.GeneratedValue;
|
import javax.persistence.GeneratedValue;
|
||||||
import javax.persistence.GenerationType;
|
import javax.persistence.GenerationType;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
|
@ -27,6 +28,7 @@ import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
|
||||||
|
import org.hibernate.Hibernate;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.enums.HorarioLiberacaoVendaPassagem;
|
import com.rjconsultores.ventaboletos.enums.HorarioLiberacaoVendaPassagem;
|
||||||
|
@ -66,7 +68,7 @@ public class CategoriaDescuento implements Serializable {
|
||||||
@JoinColumn(name = "CATEGORIA_ID", referencedColumnName = "CATEGORIA_ID")
|
@JoinColumn(name = "CATEGORIA_ID", referencedColumnName = "CATEGORIA_ID")
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Categoria categoria;
|
private Categoria categoria;
|
||||||
@OneToMany(mappedBy = "categoriaDescuento", cascade = CascadeType.ALL)
|
@OneToMany(mappedBy = "categoriaDescuento", cascade = CascadeType.ALL, fetch=FetchType.EAGER)
|
||||||
private List<CategoriaPeriodo> categoriaPeriodoList;
|
private List<CategoriaPeriodo> categoriaPeriodoList;
|
||||||
@Column(name = "INDIMPRIMEBOLETO")
|
@Column(name = "INDIMPRIMEBOLETO")
|
||||||
private Boolean indImprimeBoleto;
|
private Boolean indImprimeBoleto;
|
||||||
|
@ -263,8 +265,10 @@ public class CategoriaDescuento implements Serializable {
|
||||||
this.categoria = categoria;
|
this.categoria = categoria;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
public List<CategoriaPeriodo> getCategoriaPeriodoList() {
|
public List<CategoriaPeriodo> getCategoriaPeriodoList() {
|
||||||
List<CategoriaPeriodo> tmp = new ArrayList<CategoriaPeriodo>();
|
List<CategoriaPeriodo> tmp = new ArrayList<CategoriaPeriodo>();
|
||||||
|
// Hibernate.initialize(categoriaPeriodoList);
|
||||||
if (categoriaPeriodoList != null) {
|
if (categoriaPeriodoList != null) {
|
||||||
for (CategoriaPeriodo cp : this.categoriaPeriodoList) {
|
for (CategoriaPeriodo cp : this.categoriaPeriodoList) {
|
||||||
if (cp.getActivo()) {
|
if (cp.getActivo()) {
|
||||||
|
|
Loading…
Reference in New Issue