aspose file tools*
The moose likes Object Relational Mapping and the fly likes Executing aggregate function in ibatis Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Executing aggregate function in ibatis" Watch "Executing aggregate function in ibatis" New topic
Author

Executing aggregate function in ibatis

Khushwinder Chahal
Ranch Hand

Joined: Oct 03, 2007
Posts: 128
Hi All,

I am trying to run the following query in the ibatis :
Code:



As you can see that it is returning price_list_id along with the customer numbers in each price list. I have a doubt in mapping this query's output to my resultmap class. My result map class is billing_invoice _line which is price_list_id and customer_id as bean properties.
So my mapping looks like:

Code:



I just want to know that the way i am mapping it is it right or not?
I am doubtful about the customer_id mapping as it is returning the count(*).
Is there any other way out of doing this?
Any help will be greatly appreciated.

Thanks and Regards,
Khushwinder
Edit/Delete Message
Khushwinder Chahal
Ranch Hand

Joined: Oct 03, 2007
Posts: 128
I am getting the following exception in this:



not found in the sql map file.

If any body has any idea please help me out.
 
jQuery in Action, 2nd edition
 
subject: Executing aggregate function in ibatis