Hello,
I've just started using Hibernate and it looks really awesome, just wonderful :)
1.) However I've problems with making objects persistent.
When I execute the following code hibernate inserts as expectedone entry into my hsql-database. I can see that one row has been inserted using HSQLDB's Database manager.
When re-running the piece of code with commenting the persitence-stuff out (so that the code does only open and close a session) the existing row is deleted.
I really don't have any clue why Hibernate decides to delete an entry created just a run before.
Code:
Session session = HibernateUtil.getSessionFactory().openSession();
//Transaction tx = session.beginTransaction();
// Firma f2 = new Firma("musik5", "trasse 16", "440", "ewseds", "076768", "8787878", "linuxy@ail.com");
// session.persist(f2);
//tx.commit();
session.close();
HibernateUtil.getSessionFactory().close();
I am quite sure this is a very easy question, sorry that I did not find the answer myself :-/
2.) I would like to use Hibernate on every client. Will chaching be a problem if e.g. 100's of hibernate instances will access the same database?
Thank you in advance, lg Clemens