How to get object from composite-id in Hibernate?
Hi all, im new here, and newbie in java also
I usually get an object using id, which that id as the only PK, just like this:
Deposito deposito = dao.getDeposito(depositoId);
but now my Deposito doesn't allow to have id field, and have multiple PKs, here's the hbm code snipplet:
<key-many-to-one name="dimTime" column="TIME_KEY"/>
<key-many-to-one name="dimLocation" column="LOCATION_KEY"/>
<key-property name="accountNumber" column="ACCOUNT_NUMBER" length="7"/>
my question is:
How to get object that have composite-id in Hibernate?
actually i want to ask this question in this thread, I got it from google search, but im affraid it's gonna be OOT.
so, please help me & thanx b4!!:cool: