| Author |
Hibernate query not mapped
|
Frank Serkland
Ranch Hand
Joined: Jun 21, 2010
Posts: 96
|
|
I have the following line of code that's not running.
I'm getting the following error message.
Here is my mapping in poll1.hbm.xml. The table is capitalized the same way, so I'm confused. Any ideas?
This is hibernate.cfg.xml
|
 |
Arun Kumarr
Ranch Hand
Joined: May 16, 2005
Posts: 508
|
|
First, I'd check if you've entered poll1 or polll.
Second, I'd see if we have can declare package definiton of the class in a separate xml attribute, like in "<hibernate-mapping package=""> and remove "model." from the name attribute.
|
If you are not laughing at yourself, then you just didn't get the joke.
|
 |
Frank Serkland
Ranch Hand
Joined: Jun 21, 2010
Posts: 96
|
|
Arun Kumarr wrote:First, I'd check if you've entered poll1 or polll.
I definitely have poll1, so that is correct.
Arun Kumarr wrote:Second, I'd see if we have can declare package definiton of the class in a separate xml attribute, like in "<hibernate-mapping package=""> and remove "model." from the name attribute.
I just tried that. It didn't work.
|
 |
Frank Serkland
Ranch Hand
Joined: Jun 21, 2010
Posts: 96
|
|
Frank Serkland wrote:I definitely have poll1, so that is correct
For some reason, I had to change poll1 to Poll1, I guess because my model class is capitalized. Anyway, the line that was giving me problems works now. Go figure.
|
 |
Vijitha Kumara
Bartender
Joined: Mar 24, 2008
Posts: 3670
|
|
Frank Serkland wrote:For some reason, I had to change poll1 to Poll1...
Same reason why you got that error... You work with Objects (Classes for that matter) in ORM so exact name should be used.
|
SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
|
 |
 |
|
|
subject: Hibernate query not mapped
|
|
|