Hi Dain,

I've never seen an @Entity without an @Id annotation. I don't believe it is a valid JPA mapping without an @Id. That said, it's not required to be named Id.

So are you writing a framework or sample code? For a framework, it would be nice to be portable. For sample code, who cares?

Craig

On Dec 11, 2006, at 5:45 PM, Dain Sundstrom wrote:

On Dec 11, 2006, at 5:34 PM, Craig L Russell wrote:

Hi Dain,

How about

Object pk = bean.getId();

That implies that every persistent bean implements getId(). That would work find for the beans I write but not for beans other write. This is a major hole in the JPA spec if you ask me.

-dain

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:[EMAIL PROTECTED]
P.S. A good JDO? O, Gasp!

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to