From 0c9ab5462e63e043fe59e953b9f872d97584e0e0 Mon Sep 17 00:00:00 2001 From: rafael Date: Tue, 16 Oct 2012 21:04:45 +0000 Subject: [PATCH] Num Corrida git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@22104 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/com/rjconsultores/ventaboletos/entidad/CorridaCtrl.java | 4 ++-- .../ventaboletos/service/impl/CorridaServiceImpl.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/com/rjconsultores/ventaboletos/entidad/CorridaCtrl.java b/src/com/rjconsultores/ventaboletos/entidad/CorridaCtrl.java index c87317e9e..64f1b5854 100644 --- a/src/com/rjconsultores/ventaboletos/entidad/CorridaCtrl.java +++ b/src/com/rjconsultores/ventaboletos/entidad/CorridaCtrl.java @@ -25,7 +25,7 @@ import javax.persistence.SequenceGenerator; * @author Rafius */ @Entity -@SequenceGenerator(name = "CORRIDA_SEQ", sequenceName = "CORRIDA_SEQ", allocationSize = 1) +//@SequenceGenerator(name = "CORRIDA_SEQ", sequenceName = "CORRIDA_SEQ", allocationSize = 1) @Table(name = "CORRIDA_CTRL") public class CorridaCtrl implements Serializable { @@ -33,7 +33,7 @@ public class CorridaCtrl implements Serializable { @Id @Basic(optional = false) @Column(name = "CORRIDA_ID") - @GeneratedValue(strategy = GenerationType.AUTO, generator = "CORRIDA_SEQ") + //@GeneratedValue(strategy = GenerationType.AUTO, generator = "CORRIDA_SEQ") private Integer corridaId; @Column(name = "HORARIO") @Temporal(TemporalType.TIME) diff --git a/src/com/rjconsultores/ventaboletos/service/impl/CorridaServiceImpl.java b/src/com/rjconsultores/ventaboletos/service/impl/CorridaServiceImpl.java index c4add6aac..b0c477fbc 100644 --- a/src/com/rjconsultores/ventaboletos/service/impl/CorridaServiceImpl.java +++ b/src/com/rjconsultores/ventaboletos/service/impl/CorridaServiceImpl.java @@ -323,7 +323,8 @@ public class CorridaServiceImpl implements CorridaService { CorridaCtrl corridaCtrl = corridaCtrlService.buscar(ruta, claseServicio, marca, horario, isPisoExtra); if (corridaCtrl == null) { corridaCtrl = new CorridaCtrl(); - corridaCtrl.setCorridaId(esquemaCorrida.getNumCorrida()); + + corridaCtrl.setCorridaId(esquemaCorrida.getNumCorrida()); corridaCtrl.setMarca(marca); corridaCtrl.setRuta(ruta); corridaCtrl.setClaseServicio(claseServicio);