Static « Entity « JPA Q&A





1. Hibernate (JPA) Entity with Static collection as a member    stackoverflow.com

Is it possible to have a static collection as a member of a hibernate entity? Say I have an object Question:

public class Question {
    private String category;

   ...

2. JPA Best Practice: Static Lookup Entities    stackoverflow.com

Imagine, an Event entity references a Status Entity:

@Entity
@Table(name = "event")
public class Event()
{
  @Id
  @Column(name = "id", nullable = false)
  private long id;
  ...

  @ManyToOne
  @JoinColumn(name ...

3. static domain entities    forum.hibernate.org

/** * base entity with common properties */ public class DomainEntityBase { private long id; private String name; public DomainEntityBase() {} public DomainEntityBase(long id, String name) { this.setId(id) this.setName(name); } // etc. }