- Timestamp:
- 01/06/23 02:51:45 (23 months ago)
- Branches:
- main
- Children:
- d4b888e
- Parents:
- 1bd8d1e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/example/autopartz/model/ServiceBook.java
r1bd8d1e rf484b14 19 19 public class ServiceBook { 20 20 @Id 21 Integer ID_service_book; 21 @Column(name = "ID_service_book") 22 @GeneratedValue(strategy = GenerationType.IDENTITY) 23 Integer id; 22 24 LocalDateTime sb_created_on; 23 25 @OneToOne 24 26 @JoinColumn(name = "vin") 25 27 CarSample carSample; 28 29 public ServiceBook(CarSample carSample) { 30 this.sb_created_on = LocalDateTime.now(); 31 this.carSample = carSample; 32 } 26 33 27 34 @Override … … 30 37 if (o == null || Hibernate.getClass(this) != Hibernate.getClass(o)) return false; 31 38 ServiceBook that = (ServiceBook) o; 32 return ID_service_book != null && Objects.equals(ID_service_book, that.ID_service_book);39 return id != null && Objects.equals(id, that.id); 33 40 } 34 41
Note:
See TracChangeset
for help on using the changeset viewer.