• 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
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

mapping one pojo with multiple tables

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hibernate version 3.2

i have 3 tables and a single pojo is mapped with three in hbm.file with entity-name defined as ::

<class name="com.hr.dto.CandidateRecruitmentDTO" table="TB_SOFT_INTRV_DETAILS" entity-name="softwareObject">

<class name="com.hr.dto.CandidateRecruitmentDTO" table="TB_SOFT_INTRV_DETAILS" entity-name="bpoObject">

<class name="com.hr.dto.CandidateRecruitmentDTO" table="TB_SOFT_INTRV_DETAILS" entity-name="othersObject">

How to fetch data from table based on entity-name as defined in hbm.file. I am using the following qury in DAO class:
recruitmentlist = session.createSQLQuery(" FROM NewCandidateRecruitmentDTO as e").addEntity("softwareObject", NewCandidateRecruitmentDTO.class).list();

Its throwing exception ::: org.hibernate.MappingException: Unknown entity: com.ebix.hrms.dto.CandidateRecruitmentDTO

help me out.....
 
Look! It's Leonardo da Vinci! And he brought a tiny ad!
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic