hi guys, I'm new in JPA
I have a table with composite key in my DB
in related entity bean I use @IdClass annotation for composite keys, (1:is it cool? what's the difference between @IdClass & @EmbeddedId?)
well in composite keys related class I override boolean equals(Object obj) method
but seems I should override int hashcode() method too
i know a little about hashcode
how do I override this guy?
I mean what is it for?
Ba Sepas (thank you) Mr. Cooray
as i understood we use @IdClass annotation when we want for example check some condition, evaluate or something like that in our composite key
well if I put evaluating on DB(MySQL), I mean check the correct and legal record for adding in table
is it necessary to check and evaluating again with JPA again?(I mean use @IdClass for keys)
can I use @EmbeddedId instead of it?