Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

hibernate bug in select ?

 
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
If you open the box, you will find Heisenberg strangling Shrodenger's cat. And waving this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic