persistence@glassfish.java.net

Re: Getting the entity id with JPA

From: Aleksei Valikov <aleksei.valikov_at_gmail.com>
Date: Sat, 26 Jul 2008 13:13:08 +0200

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