mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-19 14:05:50 +00:00
Update inconsistency
If it is inconsistent, update the new owner with the old owner
This commit is contained in:
parent
fc12751b2c
commit
ef27f2edb4
1 changed files with 1 additions and 0 deletions
|
@ -78,6 +78,7 @@ public class NewOwnerStore {
|
||||||
if(iterator.hasNext()) {
|
if(iterator.hasNext()) {
|
||||||
Owner oldOwner = iterator.next();
|
Owner oldOwner = iterator.next();
|
||||||
if(id != oldOwner.getId() || !ownerStore.get(id).equals(oldOwner)) {
|
if(id != oldOwner.getId() || !ownerStore.get(id).equals(oldOwner)) {
|
||||||
|
ownerStore.put(id, convertToStaticOwner(oldOwner);
|
||||||
inconsistencies++;
|
inconsistencies++;
|
||||||
violation(id, StaticOwner.convertToStaticOwner(oldOwner), ownerStore.get(id));
|
violation(id, StaticOwner.convertToStaticOwner(oldOwner), ownerStore.get(id));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue