private static ObjectContainer db;
private static EmbeddedConfiguration configuration;
private static ClientConfiguration configurationCS;
- private int bookingNumber = 0; // if it is "static" then it is not
+ private int bookingNumber = 1; // if it is "static" then it is not
// serialized
- private int offerNumber = 0; // if it is "static" then it is not serialized
+ private int offerNumber = 1; // if it is "static" then it is not serialized
private static DB4oManager theDB4oManager = null;
private static DB4oManagerAux theDB4oManagerAux;
static ConfigXML c;
private DB4oManager() throws Exception {
- theDB4oManagerAux = new DB4oManagerAux(0, 0);
+ theDB4oManagerAux = new DB4oManagerAux(1, 1);
c = ConfigXML.getInstance();
System.out.println("Creating DB4oManager instance => isDatabaseLocal: "
+ c.isDatabaseLocal() + " getDatabBaseOpenMode: "
.getOffer().getOfferNumber(), new RuralHouse(b.getOffer()
.getRuralHouse().getHouseName(), null, null, null, null),
null, null, 0), b.getClient(), b.getBookDate());
- book.setOffer(null);
- db.delete(book);
+ Booking delete = (Booking) db.queryByExample(book).get(0);
+ delete.setOffer(null);
+ db.store(delete);
+ db.delete(delete);
db.commit();
} catch (Exception e) {
e.printStackTrace();