Query the total number of quantity for customer “C1232122” using criteria class approach. Query the total number of quantity for customer “C1232122” with order in open status using association approach. Query the total number of quantity for customer “C1232122” using association approach. The sample files are for perform the following query: File Name Download the attached Java files to the src\ormsamples folder in your eclipse project.Int qty = 0 // walk through the customer recordsįor ( int i = 0 i Database> Database Configuration to specify your database connection settings. query customer from databaseĬustomer customers = CustomerFactory.listCustomerByQuery( null, null) We first start with the traditional approach, which find out the customer from database, and walk through the order and orderline records to sum up the quantity. There are 2 approaches we can use to query such information. Now let’s try to query the total quantity of items the customer ordered. (The attached Create.java helps you to create those sample data into database). We create one single customer, who got 3000 orders, and each order attached to 10 orderlines.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |