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 - hql not working as expected

 
jim mcnamara
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic