fix: DefaultValueLoader sucks less now
parent
9f647f49cd
commit
0f19f75d48
|
@ -35,11 +35,9 @@ public class DefaultValueLoader implements CommandLineRunner {
|
||||||
@Override
|
@Override
|
||||||
public void run(String... args) {
|
public void run(String... args) {
|
||||||
|
|
||||||
// Clear all tables
|
if (employeeRepository.count() > 0) {
|
||||||
employeeRepository.deleteAll();
|
return;
|
||||||
secondarySkillRepository.deleteAll();
|
}
|
||||||
primarySkillRepository.deleteAll();
|
|
||||||
formOfAddressRepository.deleteAll();
|
|
||||||
|
|
||||||
// Create form of addresses
|
// Create form of addresses
|
||||||
FormOfAddress formOfAddress1 = new FormOfAddress();
|
FormOfAddress formOfAddress1 = new FormOfAddress();
|
||||||
|
@ -48,9 +46,6 @@ public class DefaultValueLoader implements CommandLineRunner {
|
||||||
FormOfAddress formOfAddress2 = new FormOfAddress();
|
FormOfAddress formOfAddress2 = new FormOfAddress();
|
||||||
formOfAddress2.setDescription("Frau");
|
formOfAddress2.setDescription("Frau");
|
||||||
|
|
||||||
FormOfAddress formOfAddress3 = new FormOfAddress();
|
|
||||||
formOfAddress3.setDescription("Einkaufstüte");
|
|
||||||
|
|
||||||
formOfAddress1 = formOfAddressRepository.save(formOfAddress1);
|
formOfAddress1 = formOfAddressRepository.save(formOfAddress1);
|
||||||
formOfAddress2 = formOfAddressRepository.save(formOfAddress2);
|
formOfAddress2 = formOfAddressRepository.save(formOfAddress2);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue