Skip to content

Commit

Permalink
gg
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrzz98 committed Feb 12, 2023
1 parent 79c3277 commit d647f52
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package com.backendcarwash.backendcarwash.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand All @@ -19,7 +17,6 @@
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "CLIENTES")
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "id")
public class Cliente {

@Id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ public class Vehiculo {
@Column(name = "MATRICULA", unique = true)
private String matricula;

// @JsonProperty("ID_CLIENTE")
@JsonProperty("idCliente")
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "id")
@JsonIdentityReference(alwaysAsId = true)
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name="ID_CLIENTE")
private Cliente cliente;
private Cliente idCliente;

@NotNull
@Column(name = "MODELO")
Expand Down

0 comments on commit d647f52

Please sign in to comment.