Ignore:
Timestamp:
01/03/23 03:14:50 (23 months ago)
Author:
andrejtodorovski <82031894+andrejtodorovski@…>
Branches:
main
Children:
eaf0f1b
Parents:
101cbe2
Message:

Added some views and tested them

Location:
src/main/java/com/example/autopartz/model
Files:
5 added
2 edited

Legend:

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

    r101cbe2 r23a2bc5  
    11package com.example.autopartz.model;
    22
    3 import jakarta.persistence.Entity;
    4 import jakarta.persistence.Id;
    5 import jakarta.persistence.JoinColumn;
    6 import jakarta.persistence.ManyToOne;
     3import jakarta.persistence.*;
    74import lombok.*;
    85import org.hibernate.Hibernate;
    96
     7import java.util.ArrayList;
     8import java.util.List;
    109import java.util.Objects;
    1110
     
    2322    @JoinColumn(name = "id_part_manufacturer")
    2423    PartManufacturer partManufacturer;
     24    @ManyToMany
     25    @JoinTable(name = "part_is_from_category", joinColumns =
     26    @JoinColumn(name = "id_part"),
     27    inverseJoinColumns = @JoinColumn(name = "id_category"))
     28    @ToString.Exclude
     29    List<Category> categoryList;
    2530
    2631    @Override
  • src/main/java/com/example/autopartz/model/RepairShopReviewsSummary.java

    r101cbe2 r23a2bc5  
    2020@RequiredArgsConstructor
    2121@Immutable
    22 @Table(name = "repair_shop_reviews_summary")
    23 @Subselect("select * from repair_shop_reviews_summary")
     22@Table(name = "`repair_shop_reviews_summary`")
    2423public class RepairShopReviewsSummary implements Serializable {
    2524    @Serial
Note: See TracChangeset for help on using the changeset viewer.