I've been playing around with google cloud endpoints and I've been trying to store entities in the datastore. I came across these two different annotations @entity and @persistencecapable which is to be placed prior to the declaration of a POJO class and I was confused as to what the difference is.
I am aware that PersistenceCapable comes from javax.jdo.annotations.PersistenceCapable and Entity comes from javax.persistence.Entity. From what I've read, they both seem to indicate that the POJO class is to be stored in the datastore, but what is the difference and when should you use each?
Thanks.
One is for JDO and one is for JPA. If using JDO you can use either. If using JPA you have to use Entity.