• 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
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

one to many bidirectional error driving me mad

 
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.
 
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
 
Bartender
Posts: 2856
10
Firefox Browser Fedora 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!!!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic