Hi,
I want to get values from more than one table... I'm new to this sql2java. Can any one help me to,how to get from more than one table... is it manual work? or sql2java has create separate method for that.... please guide me...
Thanks in adv.
Regards,
Viswa
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I want to get values from more than one table... I'm new to this sql2java. Can any one help me to,how to get from more than one table... is it manual work? or sql2java has create separate method for that.... please guide me...
Thanks in adv.
Regards,
Viswa
hi, I'm new to sql2java too, so I'm not too sure if what I say is correct...
there is support for foreign key(this is the join you are looking for, right?)
eg from the sample db on the site
http://sql2java.sourceforge.net/copied/sample-hsqldb.sql
delivery is link to customer and product
// assuming a DeliveryBean has already been loaded
// and you want to get the customer who made this order
CustomerBean customerBean = DeliveryManager.getCustomerBean(deliveryBean.getCustomerId());
Thanx for guide.
Viswa
right and let's say you want to load all the Products purchased by a Customer you can invoke:
customerManager.loadProductViaDelivery(myCustomerBean)
sql2java detected that Delivery is also a junction table between customer and products.