wood burning stoves*
The moose likes Object Relational Mapping and the fly likes one to many bidirectional error driving me mad Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "one to many bidirectional error driving me mad" Watch "one to many bidirectional error driving me mad" New topic
Author

one to many bidirectional error driving me mad

rodrigo bengoechea
Greenhorn

Joined: Nov 15, 2008
Posts: 10
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

Joined: Dec 25, 2008
Posts: 12
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

Joined: Jun 06, 2007
Posts: 2716
    
    6

"aswin java" please check your private messages for an important administrative matter. You can see them by clicking the My Private Messages link above.


SCJP, SCWCD.
|Asking Good Questions|
rodrigo bengoechea
Greenhorn

Joined: Nov 15, 2008
Posts: 10
Thanks aswin java!!! I solved the problem instantly!!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: one to many bidirectional error driving me mad
 
Similar Threads
Hibernate error
Many to Many Relation Error Driving Me Mad
Error with Hibernate
Hibernate: ArryaList Collection associations are not working
one to many relation error