File tree 1 file changed +3
-4
lines changed
src/main/java/com/skia/lab/Components
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -52,8 +52,7 @@ public void generateMockData() {
52
52
53
53
long eIdx = 0 ;
54
54
55
-
56
- departmentRepository .deleteAll ();
55
+ if (departmentRepository .count () != 0 ) departmentRepository .deleteAll ();
57
56
if (departmentRepository .count () == 0 ){
58
57
for (int i = 0 ; i < 5 ; i ++) {
59
58
var d = new Department (faker .animal ().name ());
@@ -92,7 +91,7 @@ public void generateMockData() {
92
91
if (i == 0 ) eIdx = employees [i ].getId ();
93
92
}
94
93
}
95
- // if(hireRepository.count() != 0) hireRepository.deleteAll();
94
+ if (hireRepository .count () != 0 ) hireRepository .deleteAll ();
96
95
if (hireRepository .count () == 0 ){
97
96
98
97
var e0 =employeeRepository .findById ((long )eIdx );
@@ -107,7 +106,7 @@ public void generateMockData() {
107
106
108
107
}
109
108
110
- attendanceRepository .deleteAll ();
109
+ if ( attendanceRepository . count () != 0 ) attendanceRepository .deleteAll ();
111
110
if (attendanceRepository .count () == 0 ){
112
111
113
112
var e0 =employeeRepository .findById ((long )eIdx );
You can’t perform that action at this time.
0 commit comments