I am a novice in using Hibernate. We only use this framework because we are handling an existing application that uses it.
Ok. The issue is not happening all the time but it happend 3 times already. In a table, there is a column (like IDX_COLUMN) that has a db property of allow null. In the hibernate mapping, it is defined as index column. When a user tried to save the data, for example, there should be 50 rows or entries to be created. The first 25 rows/entries have a null value for IDX_COLUMN and the rest are ok starting from 26.
The problem here is whenever the app loads the data using hibernatetemplate, it throws an exception bec of the null index. I tried to update those entries and put the correct value for the indeces since it is just a regular field in DB2 database table but when the app executes my UPDATE query, it crashes on that point. But running the update query directly to the database works fine. So i don't know why the app is not allowing my Update query.
Is it really impossible to update it thru code? Or did i miss something like hibernate settings? I read about inverse=true but not sure if that will solve my problem. All I just want to do is to update the index column values with correct ones and not null.
Thank you my well lotioned goddess! Here, have my favorite tiny ad!