Xcuello 5 лет назад
Родитель
Сommit
1460b7537e

+ 5
- 0
src/main/java/com/zipcodewilmington/bakery/Models/Baker.java Просмотреть файл

@@ -1,5 +1,7 @@
1 1
 package com.zipcodewilmington.bakery.Models;
2 2
 
3
+import com.zipcodewilmington.bakery.Repositories.BakerRepository;
4
+import org.springframework.beans.factory.annotation.Autowired;
3 5
 import org.springframework.data.annotation.Id;
4 6
 import javax.persistence.Entity;
5 7
 import javax.persistence.GeneratedValue;
@@ -8,6 +10,9 @@ import javax.persistence.GenerationType;
8 10
 @Entity
9 11
 public class Baker {
10 12
 
13
+    @Autowired
14
+    BakerRepository bakerRepository;
15
+
11 16
     @Id
12 17
     @GeneratedValue(strategy = GenerationType.AUTO)
13 18
     private Long id;

+ 5
- 0
src/main/java/com/zipcodewilmington/bakery/Models/Muffin.java Просмотреть файл

@@ -1,5 +1,7 @@
1 1
 package com.zipcodewilmington.bakery.Models;
2 2
 
3
+import com.zipcodewilmington.bakery.Repositories.MuffinRepository;
4
+import org.springframework.beans.factory.annotation.Autowired;
3 5
 import org.springframework.data.annotation.Id;
4 6
 import javax.persistence.Entity;
5 7
 import javax.persistence.GeneratedValue;
@@ -8,6 +10,9 @@ import javax.persistence.GenerationType;
8 10
 @Entity
9 11
 public class Muffin {
10 12
 
13
+    @Autowired
14
+    MuffinRepository muffinRepository;
15
+
11 16
     @Id
12 17
     @GeneratedValue(strategy = GenerationType.AUTO)
13 18
     private Long id;