• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Trouble in using joins in hibernate

 
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I have two tables with the following columns :

Table name : employee
empid | int(11) | YES | | NULL
ename | varchar(20) | YES | | NULL
mgrid | varchar(20) | YES | | NULL

Table name : link
empid | int(11) | YES | | NULL
mgrid | varchar(20) | YES | | NULL

I would like to use the a criteria and mapping for the following condition in sql :

the mapping i have created looks like the below:

and

NewFile.hbm


I am however getting errors like
org.hibernate.PropertyAccessException: exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of Honey.setLast

Please help me asap.
[ November 03, 2008: Message edited by: Paul Sturrock ]
 
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is that possible to see your persistent class and your mapping file ?
[ November 03, 2008: Message edited by: ntumba lobo ]
 
Betsy Camel
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
//package addressbook.HQL;


I have already posted the mapping files. Please help!
[ November 04, 2008: Message edited by: Paul Sturrock ]
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You don't specify a foreign key name in your one-to-one mapping for Honey, which I think means you are trying to associate a row with itself.
 
Cob is sand, clay and sometimes straw. This tiny ad is made of cob:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic