Skip to content

Commit

Permalink
* Correccion evitar repetidos
Browse files Browse the repository at this point in the history
  • Loading branch information
ripper2hl committed Apr 13, 2024
1 parent aaf5732 commit a5b8606
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/java/com/perales/sepomex/model/Ciudad.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

@Indexed
@Data
@EqualsAndHashCode( exclude = { "id", "estado" , "municipios", "colonias", "codigosPostales"})
@EqualsAndHashCode( exclude = { "id", "estado" , "municipio", "colonias", "codigosPostales"})
@NoArgsConstructor
@JsonIdentityInfo(generator=ObjectIdGenerators.PropertyGenerator.class, property="id")
@Entity(name = "ciudad")
Expand Down Expand Up @@ -58,8 +58,7 @@ public class Ciudad implements Serializable {
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "municipio_id")
private Municipio municipio;



@OneToMany(mappedBy = "ciudad", fetch = FetchType.LAZY)
private List<CodigoPostal> codigosPostales;
}

0 comments on commit a5b8606

Please sign in to comment.