forked from DevFW-CICD/spring-petclinic
fixed bug in JPA implementation: "save" methods were implemented using "merge" instead of "persist"
This commit is contained in:
parent
a9b0b47480
commit
80159fa3d7
4 changed files with 8 additions and 3 deletions
|
|
@ -70,7 +70,7 @@ public class JpaOwnerRepositoryImpl implements OwnerRepository {
|
|||
|
||||
@Override
|
||||
public void save(Owner owner) {
|
||||
this.em.merge(owner);
|
||||
this.em.persist(owner);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public class JpaPetRepositoryImpl implements PetRepository {
|
|||
|
||||
@Override
|
||||
public void save(Pet pet) {
|
||||
this.em.merge(pet);
|
||||
this.em.persist(pet);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public class JpaVisitRepositoryImpl implements VisitRepository {
|
|||
|
||||
@Override
|
||||
public void save(Visit visit) {
|
||||
this.em.merge(visit);
|
||||
this.em.persist(visit);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue