Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mapping one pojo with multiple tables

vineet java
Posts: 1
  • Mark post as helpful
  • send pies
  • 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="" table="TB_SOFT_INTRV_DETAILS" entity-name="softwareObject">

<class name="" table="TB_SOFT_INTRV_DETAILS" entity-name="bpoObject">

<class name="" 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.....
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic