Hello,
I think JPA 2.0 might have a standard API for that.
regards,
-marina
Aleksei Valikov wrote:
> Hi.
>
>
>>There may be more than 1 @Id annotation if the entity defines @IdClass on
>>it.
>
>
> Yes, I know, the code I've posted does not pretend to be complete.
>
> The question is if there is a standard way to get the id of the entity
> (like, an oppositoe of getting the entity by its id). The trick with
> annotations works, but what if entities are mapped using the XML
> mappings?
>
> Bye.
> /lexi