Application Server:Tomcat 5.5.20 on WindowsXP/Debian Etch
Hibernate version: 3.0.x
Database version: MySQL 5.0.32-Debian_7etch5-log and 5.0.51b-community-nt
Hi,
I got a problem with hibernate 3 and mysql 5,
[when I select, I get 2 datas]
Hibernate:
select
this_.FolderId as FolderId15_0_,
this_.Name as Name15_0_,
this_.Type as Type15_0_,
this_.Created as Created15_0_,
this_.ParentId as ParentId15_0_
from
dashboardfolder this_
where
this_.ParentId=?
folder size= 2 <--- [I count the data and print it]
[Next, i do some inserting]
Hibernate:
insert
into
folder
(Name, Type, Created, ParentId)
values
(?, ?, ?, ?)
[I have check the data in database, the data inserted successfully, however when i select again...]
Hibernate:
select
this_.FolderId as FolderId15_0_,
this_.Name as Name15_0_,
this_.Type as Type15_0_,
this_.Created as Created15_0_,
this_.ParentId as ParentId15_0_
from
dashboardfolder this_
where
this_.ParentId=?
folder size= 2 <--- [I still got only 2 datas, meanwhile I expect it to be 3]
[After i restart my tomcat]
Hibernate:
select
this_.FolderId as FolderId15_0_,
this_.Name as Name15_0_,
this_.Type as Type15_0_,
this_.Created as Created15_0_,
this_.ParentId as ParentId15_0_
from
dashboardfolder this_
where
this_.ParentId=?
folder size= 3 <-- [I got 3 datas]
I don't want to restart my tomcat everytime I add data, flushing the session didn't help either.
It didnt seem to matter which platform we were on, it consistently had same problem on windows or debian etch. We also tried setting tx_isolation=READ-COMMITTED on mysql but it didnt seem to help.
We used to run the application on tomcat5+SQLServer2000 and we never had this problem, so it looks like a MySQL related issue.
Just wondering if anyone have encountered similar problem?
Thanks
azhan
|