identity « ID « JPA Q&A





1. Custom wrapper for id key    stackoverflow.com

I want to wrap id in custom class. Like this

@Entity
@Table(name = "USERS")
public class User {
    @EmbeddedId
    UserId id;
}
@Embeddable
public class UserId implements Serializable {
   ...

2. Identity id's, many-to-one and Sybase ASE    forum.hibernate.org

This is probably something stupid I have missed but why does this happen? I've got the id of my parent class setup like this: Code: ...

3. Error: GenerationType.IDENTITY requires id.    forum.hibernate.org

I'm using Hibernate 3.3.1 with Postgres. My persistence.xml contains the following: I have @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private Long id; @Column(...) private String name; I see the db created the column as bigserial, which is what I want. When I go to persist the object it throws an error saying that the id parameter is blank. Am ...