Configuración para que los Ids de las tablas sean autoincrementables

parent 0ab52fb9
...@@ -13,7 +13,7 @@ public class ModelExample { ...@@ -13,7 +13,7 @@ public class ModelExample {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "UZITAREA_CODE") @Column(name = "UZITAREA_CODE")
private Long id; private Long id;
......
...@@ -2,10 +2,7 @@ package ec.edu.espe.movilidad.MovilidadWS.model; ...@@ -2,10 +2,7 @@ package ec.edu.espe.movilidad.MovilidadWS.model;
import lombok.Data; import lombok.Data;
import javax.persistence.Column; import javax.persistence.*;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Data @Data
@Entity @Entity
...@@ -14,6 +11,7 @@ public class ModelParameters { ...@@ -14,6 +11,7 @@ public class ModelParameters {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "num") @Column(name = "num")
private Long id; private Long id;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment