Quote:
The problem is that I dont really want to map to an entity..
if my perception of ur prob is correct, im afraid u cant do it unless u dont ask hibernates help for the associating your entities .
Quote:
i just want to get the primary key. So that in my person class I have getters and setter returning an Integer representing the shipAddID.
may be u can still do it the hibernate way and use an appropriate HQL or criteria query according to your needs .
any other sugesstions are welcome too... :)