• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Column does not exist

 
Gian Marco Gallo
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good day

I've got a problem in a project that I'm developing and I'm becoming crazy :|
I'm using jboss5.1 with ejb3, hibernate and postgres8.4. I've created a stupid table called 'ships' because I want to test what happens when a table hasn't got a primary key.
My entity bean is:



I've used the @idclass to specify a combination of id. But when I try to execute a stupid query via entity manager I get this error:



I used a similar entity class in another project and it worked fine. Can you give me a help, please?

Thanks a lot
 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"ship_name"

vs.

"shipname"

vs.

"shipName"

Take it from there!

WP

 
Gian Marco Gallo
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Uh? The column in the table has "ship_name" as name, the object in the Ship class has "shipName" as name. Note that if I remove the @idclass and the relative class, the query is executed correctly.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic