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

parent 0ab52fb9
......@@ -13,7 +13,7 @@ public class ModelExample {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "UZITAREA_CODE")
private Long id;
......
......@@ -2,10 +2,7 @@ package ec.edu.espe.movilidad.MovilidadWS.model;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.*;
@Data
@Entity
......@@ -14,6 +11,7 @@ public class ModelParameters {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "num")
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