ObjectDB ObjectDB

Internal Website Search

121-130 of 200 resultsRefresh

@OneToMany(fetch = FetchType.LAZY) list is always null

Parent { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "b") private int id; @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL) private List<Child> children; public int getId() { return id; } public void setId(int id

Should derived fields of an EmbeddedId be manually maintained by app code?

.... public void setSingleton(EContainer singleton) { this.id.cont = singleton.id; this.container ... .... public void setParent(ECompoundKeyMapItem parent) { this.id.prnt = parent.id; this.parent ... javax.persistence.Id; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery

Optimistic locking: prevent version increment on entity collection attribute

@Entity public class Document {        // ID is generated by the database     @Id private long id ... <Reading>();        public long getId() {         return id;     }        public ArrayList<Reading ... ) {         this.readings.add(reading);     } } @Entity public class Reading {        // ID


() {... } ... } @Entity public class Employee { ... @Id Integer getEmpId() { ... } @ManyToOne @JoinColumn(name="dept_id") public Department ... { @Id public Integer getEmpId() { ... } ... @ManyToOne @JoinColumn(name


_PHONE", joinColumns= @JoinColumn(name="CUST_ID", referencedColumnName="ID"), inverseJoinColumns= @JoinColumn(name="PHONE_ID", referencedColumnName="ID


Method javax.persistence.metamodel.IdentifiableType Set<SingularAttribute<?,?>> getIdClassAttributes() Return the attributes corresponding to the id class of the identifiable type. Returns: id attributes Throws: IllegalArgumentException - if the identifiable type does not have an id class Since: JPA 2.0


getOrders() { return orders; } In Order class: @ManyToOne @JoinColumn(name="CUST_ID ... ; } // In Order class: @ManyToOne @JoinColumn(name="CUST_ID", nullable=false ... ) @JoinColumn(name="CUST_ID") // join column is in table for Order public Set getOrders


_SERVER_TIME_ZONE_ID The name of the persistence manager factory element's "server-time-zone-id" attribute. The name of the persistence manager factory element's "server-time-zone-id" attribute ... " Since: JDO 2.1 See Also: PersistenceManagerFactory.getRetainValues() String PROPERTY_SERVER_TIME_ZONE_ID


Since: JDO 2.2 boolean equals(Object obj) Determine if the other object represents the same object id. Determine if the other object represents the same object id. Parameters: obj - the other object Returns: true if both objects represent the same object id Since: JDO 1.0 boolean equals(Object obj


An instance of this class is thrown when attempting to create an object id when the object id constructor parameter is null. This might occur when creating an object id instance from a transient instance

Getting Started

ObjectDB is very easy to use. Follow the Getting Started Tutorial and the Quick Tour manual chapter and in minutes you may be able to write and run first Java programs against ObjectDB.

Prior knowledge or experience in database programming (SQL, JDBC, ORM, JPA, etc.) is not required, but some background in using the Java language is essential.

Need Help?

  1. Search ObjectDB website
  2. Read the FAQ
  3. Follow the Tutorials
  4. View or post in the forum
  5. Search or file an issue
  6. Contact support