Thanks for the reply .I tried that,But my problem here is,i have two classes for the table t_gb_OrganizationMaster.
(1)TGbOrganizationMaster and( 2)TGbOrganizationMasterId is having orgId,stateId,reginId .So i tried something like this.
Code:
TGbOrganizationMaster hai = new TGbOrganizationMaster();
TGbOrganizationMasterId tgbid = new TGbOrganizationMasterId();
HashSet set = new HashSet();
tgbid.setCOrgId(orgid);
tgbid.setCStateId(stateId);
tgbid.setCRegionId(regionId);
hai.setCOrgName(orgName);
hai.setCOrgAddress(orgAddress);
set.add(tgbid);
set.add(hai);
session.save(set);
But i am getting error something like this
Quote:
ERROR [STDERR] org.hibernate.MappingException: Unknown entity: org.hsqldb.lib.HashSet
at org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:550)
at org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1338)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:98)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:187
To use set, i imported
Code:
import org.hsqldb.lib.HashSet;
.
Please give a solution for this.