posted 15 years ago
Hello All,
I got one problem in joing 2 tables.
The problem is as follows.
I do have to tables CAMPAIGNREQUEST (ID,CLIENTID,EXTERNALID,ERRORCODE,CREATED)
and CLIENT (ID,NAME,PRIORITY,GENESISBILLERID,CREATED)
For Retrieving the "GENESISBILLERID" from CLEINT I have writtent 2 DB calls.
One is to Retrieve the CleintID from CAMPAIGNREQUEST As initially I have ID of CAMPAIGNREQUEST
Then I used the CleintID from the Result and then Fired another DB Call to Get CLIENT Object (i.e GENESISBILLERID )
I feel this is an Ugly way to have two seperate call to retrieve GENESISBILLERID from CLIENT.
Can any one plese suggest how I Can define relation ship between these two tables? (CLIENT 1-----M CAMPAIGNREQUEST )
So that in one DB call I can get the required Result.
I dont want to use HQL in proj. I have on HibernateUtil class which dones all DB related operation and i have used Criteria So far for all my Queries..
Thanks,
PP.