nikhilg07 / SpringProject

1 stars 0 forks source link

StudentServiceImpl #3

Open shahmohit9975 opened 2 years ago

shahmohit9975 commented 2 years ago

https://github.com/nikhilg07/SpringProject/blob/928590d39f891e61749ad9cd1efaf97a75aac584/dependencyInjection%202.0/src/main/java/com/quinbay/dependencyInjection/service/StudentServiceImpl.java#L222

if you have 100 filels then we can not add 100 fields value in students object and then delete it. its not proper wy to delete any record. you can directly delete it by id.

shahmohit9975 commented 2 years ago

https://github.com/nikhilg07/SpringProject/blob/928590d39f891e61749ad9cd1efaf97a75aac584/dependencyInjection%202.0/src/main/java/com/quinbay/dependencyInjection/service/StudentServiceImpl.java#L175 Private access modifier is not defined.

shahmohit9975 commented 2 years ago

https://github.com/nikhilg07/SpringProject/blob/928590d39f891e61749ad9cd1efaf97a75aac584/dependencyInjection%202.0/src/main/java/com/quinbay/dependencyInjection/service/StudentServiceImpl.java#L234

you can directly set the name here. std.setName(""); repo.save(std); & use proper variable name. std name is not preferable.