Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hibernate bug in select ?

 
jay vas
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 ?


 
Edvins Reisons
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic