Git Repository Public Repository

RRRRHHHH_Code

URLs

Copy to Clipboard

Diff Revisions dd0098 ... vs bdf772 ... for ruralHouses/src/dataAccess/DB4oManager.java

Diff revisions: vs.
  @@ -462,6 +462,10 @@
462 462 ObjectSet<RuralHouse> result = db.queryByExample(house);
463 463 if (result.isEmpty()) {
464 464 Owner ow = (Owner) db.queryByExample(rh.getOwner()).get(0);
465 + ObjectSet<RuralHouse> orh = db.queryByExample(new RuralHouse(null, ow, null, null, null));
466 + for (RuralHouse aa: orh){
467 + db.delete(aa);
468 + }
465 469 db.delete(ow);
466 470 ow.addRuralHouse(rh);
467 471 db.store(ow);