• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

hibernate bug in select ?

 
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys :


I have the following mapping file (autogenerated in hibernate). If I
uncomment the text inside the <!-- --> a select all NmrPulseStateNuclei winds up causing a "Invalid value for getLong() - '"1H8"' " error.

Now, the data in the table is as follows (sample for 1st row).

N_pulse_SN_ID=1
N_pulse_SN_State=1
N_pulse_SN_Nucleus=""1H8""
N_pulse_SN_Phase=""
N_pulse_SN_Incremented=0
N_pulse_SN_Convolution=""

So it looks like hibernate is selecting the WRONG column on accident ?
I.E. it is trying to map n_pulse_sn_nucleus into n_pulse_sn_id...
why would this be ?

I am shocked that autogenerated hibernate code is not even doing type safe queries ?


 
Ranch Hand
Posts: 364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jay,

Most of the time, it turns out that the bug is ours and not Hibernate's .
Try looking into the class definitions, especially the types of ID fields.
 
I’m tired of walking, and will rest for a minute and grow some wheels. This is the promise of this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic