Joined: Fri Feb 27, 2009 12:56 am Posts: 1 Location: Bandung
|
Hello, i have problem with restriction in hibernate.
This is my problem.
I want to create the createria so that i can print out data which have this criteria
Price under 400USD and Supplier is MySupplierName.
But the price column is placed in Product table and Supplier Name column is placed in Supplier table. How i can grab such data like i want with these criteria?
This is the complete table structure per table which i had.
Table Product
ID
Product Name
Description
Price
Supplier_ID
Table Supplier
ID
Supplier Name
I generate the id of product table with increment class in my mapping xml likewise my supplier table id. I generate supplier id in mapping sql.
So how i can create the criteria with that specification, price from product table and supplier name from supplier table.
Oh...is anybody can give me some simple code?
(Code which coded in netbean is preferable)
Ok. I very - very needs your help. Thanks.
May God bless you.
_________________ Otniel Simbolon is My Name
|
|