Merge remote-tracking branch 'origin/LabWork03' into LabWork03

# Conflicts:
#	src/main/java/ru/ulstu/is/sbapp/HardwareShop/models/Product.java
#	src/main/java/ru/ulstu/is/sbapp/HardwareShop/services/ProductService.java
#	src/test/java/ru/ulstu/is/sbapp/JpaProductTests.java
This commit is contained in:
Артём Алейкин 2023-05-01 21:50:27 +04:00
commit 56bc353670
3 changed files with 4 additions and 4 deletions

View File

@ -13,6 +13,8 @@ repositories {
}
dependencies {
// https://mvnrepository.com/artifact/commons-io/commons-io
implementation group: 'commons-io', name: 'commons-io', version: '2.6'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'com.h2database:h2:2.1.210'

View File

@ -10,9 +10,6 @@ public class Category {
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@OneToMany(mappedBy = "category")
private List<Product> productList;
@Column
private String name;

View File

@ -10,7 +10,8 @@ public class Manufacturer {
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@ManyToMany(mappedBy = "manufacturerList")
@ManyToMany(fetch = FetchType.EAGER,
mappedBy = "manufacturerList")
private List<Product> productList;
@Column