thisStaff = (Staff_Member) session.createQuery("from Staff_Member where email='" + UName + "' and pass_word='" + PWord + "'").uniqueResult();
which gives the output:
Hibernate: select staff_memb0_.staff_member_id as staff1_0_, staff_memb0_.manages_dept as manages2_0_, staff_memb0_.first_name as first3_0_, staff_memb0_.last_name as last4_0_, staff_memb0_.pass_word as pass5_0_, staff_memb0_.staff_type_id as staff6_0_, staff_memb0_.email as email0_ from staff_member staff_memb0_ where staff_memb0_.email='flowers@gmail.com' and staff_memb0_.pass_word='flowers'
this is then followed by the call to fetch the dept_name as stated in the original post.
Cheers
|