• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Index column is null

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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.

Thanks!



 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic