[hibernate-dev] Hibernate join problem

2008-07-13 Thread sylvain mouquet
Hi I have not understand why you tell that you have 3 tables. HQL is based on core model (mapping files) not on SQL tables. You must write the query in hql and you must use objects in your core model not id : select dm.id, dm.drug_name, sum(cds.qty_available) from drug_master dm

[hibernate-dev] Hibernate join problem

2008-07-05 Thread ManiKanta G
Hi, I have two tables (drug_master, cds_drugstore) with cds_master.drug_id reference to drug_master.id. I want to fetch all the drugids, drug_name, sum of avaialble drugs (if avaialable, or else null). I have this native MySql query, which is working fine. but I am unable to port this in t