Ignore:
Timestamp:
01/03/23 03:19:50 (23 months ago)
Author:
andrejtodorovski <82031894+andrejtodorovski@…>
Branches:
main
Children:
feffc2f
Parents:
23a2bc5
Message:

Added all ManyToMany tables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/example/autopartz/model/Part.java

    r23a2bc5 reaf0f1b  
    22
    33import jakarta.persistence.*;
    4 import lombok.*;
     4import lombok.Getter;
     5import lombok.RequiredArgsConstructor;
     6import lombok.Setter;
     7import lombok.ToString;
    58import org.hibernate.Hibernate;
    69
    7 import java.util.ArrayList;
    810import java.util.List;
    911import java.util.Objects;
     
    2830    @ToString.Exclude
    2931    List<Category> categoryList;
     32    @ManyToMany
     33    @JoinTable(name = "part_is_in_stock_in_warehouse", joinColumns =
     34    @JoinColumn(name = "id_part"),
     35            inverseJoinColumns = @JoinColumn(name = "id_warehouse"))
     36    @ToString.Exclude
     37    List<Warehouse> warehouseList;
     38    @ManyToMany
     39    @JoinTable(name = "part_is_appropriate_for_car", joinColumns =
     40    @JoinColumn(name = "id_part"),
     41            inverseJoinColumns = @JoinColumn(name = "id_car"))
     42    @ToString.Exclude
     43    List<Car> carList;
    3044
    3145    @Override
Note: See TracChangeset for help on using the changeset viewer.