Quote:
but i dont know which association
Only you can know what kind of relation is between the EmpDetail and Employee classes. There is no relation between those two classes in the mapping documents and there is no relation in the java code either, so maybe there is no connection. Only you can know. But if there is no relation then you can't join those two classes in a query either.
You should not mix HQL (which is what you use with Hibernate) and SQL. In SQL you can join on just everything, but in HQL only on what has been mapped in the mapping documents which need to match both the java code and the underlying database.
The link I provided in the previous post gives you several example of how to map an association between two classes.