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:
commit
56bc353670
@ -13,6 +13,8 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
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-web'
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
|
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
|
||||||
implementation 'com.h2database:h2:2.1.210'
|
implementation 'com.h2database:h2:2.1.210'
|
||||||
|
@ -10,9 +10,6 @@ public class Category {
|
|||||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@OneToMany(mappedBy = "category")
|
|
||||||
private List<Product> productList;
|
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
@ -10,7 +10,8 @@ public class Manufacturer {
|
|||||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@ManyToMany(mappedBy = "manufacturerList")
|
@ManyToMany(fetch = FetchType.EAGER,
|
||||||
|
mappedBy = "manufacturerList")
|
||||||
private List<Product> productList;
|
private List<Product> productList;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
|
Loading…
Reference in New Issue
Block a user