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

one to many bidirectional error driving me mad

 
rodrigo bengoechea
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone!, I'm devoloping my first application using hibernate and I'm getting an error when I'm doing a query to my database. I was looking for solutions the last 3 days and I can't figure out where's the mistake, so I decided to consult you.

Basically, I'm developing a web application where users can create group and adminstrate them. To map this relation I've created a class named user that has a set of groups to administrate and a class named group that has a reference to it's administrator. When I'm trying to find out if a group with a certain name exists and exception it's thrown. Can anybody help me please?

Here's the code:

The hibernate config:


The hbm:


The User class:


The Group class:


The method of the GroupDAO class where I'm getting the exception:


And finally the error:


Anything you could tell me will be very helpful!
Thanks everybody in advance!

Merry Christmas!

Rodrigo.
 
aswin kumar
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

just check it whether you are using any keywords of mysql as your properties,i think group is mysql reserved words.

regards
 
Amit Ghorpade
Bartender
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"aswin java" please check your private messages for an important administrative matter. You can see them by clicking the My Private Messages link above.
 
rodrigo bengoechea
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks aswin java!!! I solved the problem instantly!!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic