fix: DefaultValueLoader sucks less now

pull/1/head
Lunix-420 2024-11-11 16:46:43 +01:00
parent 9f647f49cd
commit 0f19f75d48
1 changed files with 3 additions and 8 deletions

View File

@ -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);