jhoeller wrote:
Basically, your code looks fine. How are you invoking it? Fetching the "DAO" bean and calling the "storeCBean" method?
Try to find out whether Hibernate attempts to flush, and whether it actually issues any SQL statements to the database: Turn Hibernate's logging of SQL statements on, and raise the general logging level at least to INFO.
Juergen
Hi, I've solved my problem. It results from storeCBean() method
of the DAOImpl where I want to insert data into database. The implementation code I use is saveOrUpdate(); which seemly would not work because originally there's no data (the same as in the test class) in the database. Therefore, I change method saveOrUpdate() to save(). Finally it gets to work. Simply I do not know the reason why. Would anyone be kindly to exaplain it or tell me where is resource / doc talking about this? I'm new to hibernate and appreciate any suggestions, sincerely.
Arsene