I met a weird problem when using hibernate 3.0. I got a table that has 63 columns. But when I try to load all data twice using hibernate, it will keep updating the table. And sometimes when I delete some columns in the configuration, it will work fine, but sometimes it still doesn't work. It's uncertain.
And another weird problem maybe related to this. I try to insert the data into this table using hibernate, but somehow, some columns will always show 0 value as I put whatever numeric values to them.
And this table has 63 columns, has column types like Number(18), Numeric(12, 6), Varchar2, Char and Date. Nomally it will have around 5000 records. Weird thing is it will keep updating the table after I call findList twice. Thanks.
I got the reason for this. It is because the FLUSHMODE thing. If I set the flush mode to never, it works fine for querying and loading data. But another problem comes up, this table is not read only, I need to update and insert also. If I set it to never flush mode, I have to manully call flush to update and insert data, but this again cause the hibernate to keep updating that table.
The annoying thing is other tables are working pretty fine. Only this table keeps updating when I try to load data, update or insert.
And like I said before, there're 10 columns in this table that whatever values you give to them, they will become 0. And I tried to change the column names or hibernate mapping name for these columns, then it works fine, I think somehow these 2 problems are related.
But to be honest, change names is not a good reason for solving problems I think. So I have to find the radical.
No. No. No. No. Changed my mind. Wanna come down. To see this tiny ad: