hi,
I have small issue with the flushing
I suppose I don't quite understand the flushing mechanism but as far as I know the flush should occur between DML and a select statement (if flush mode is AUTO). Is that correct ?
so I'm using hibernate core 3.3.1 GA and I'm doing this:
Code:
Currency newCurrency = new Currency();
newCurrency.setCurrency(currency);
hbsession.save(newCurrency);
Query query = hbsession.createQuery("from hibernate_mappings.Currency");
query.list(); // here I get old data i.e. no new line has been inserted
of course this works if I use the Transaction API or if I explicitly call flush()
but I don't need transaction here and I also don't want to call flush every time such piece of code is executed
Is this a problem or my understanding of flush is incorrect ? Or am I doing something wrong ?