Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

hibernate - hql not working as expected

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi-

see <below>

in hibernate when i look at dynamic sql output, the description field is named something else.
category0_.ACTION_as col_3_0_ should be category0_.description as col_3_0_

i get the dreaded error 42X04 error. i cant figure it out. i can tell you that when i stay away
from this field name in my hql editor all the hql is ok.

any assistance would be really cool. i am really stuck.

thanks,
3rdshiftcoder

dynamic: sql output from hibernate
0: short, short, integer, string
-----------------
select
category0_.categoryid as col_0_0_,
category0_.parentid as col_1_0_,
category0_.accountnum as col_2_0_,
category0_.ACTION_ as col_3_0_
from
USER1.Category category0_
where
category0_.categoryid<10

 
jim mcnamara
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi-

if anyone knew, i'd still like to know but i just thought i can bypass hibernate on this one.

very odd.

thanks,
3rdshiftcoder
 
jim mcnamara
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi-

for some reason i had the description name set to _Action.
why in the world i did that? i couldnt believe it when i finally saw that quite
literally the error was trying to tell me what was going on.

now i have my new code working.

i did fool with hql editor
and usually i dont. what a great tool.

i am embarrassed to say just how stuck i was.

no more of this but no more time left on my weekend either.
i am taking the next 2 nights off!

thanks,
later
 
What a stench! Central nervous system shutting down. Save yourself tiny ad!
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic