ObjectDB ObjectDB

Internal Website Search

131-140 of 200 resultsRefresh

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

.Entity; import javax.persistence.EntityManager; import javax.persistence.FlushModeType; import ... static EContainer getInstance(EntityManager em) { EContainer c = em.find(EContainer.class, "1 ... , EntityManager em) throws TestException { if (lastInstanceInMap == null) { lastInstanceInMap = 0

Insertion Speed Rate and Batch Load

This test from the Memory Leak thread uses a separate transaction, and moreover, a new EntityManager per stored entity object. A batch load should reuse the EntityManager and persist a large number ... =             Persistence.createEntityManagerFactory("$objectdb/db/speed.odb");         EntityManager


of the EntityManager, Query, and TypedQuery interfaces that allow lock modes to be specified or used

createEntityManagerFactory(persistenceUnitName, properties)

that creates EntityManagers configured according to the specified persistence unit. Since: JPA 1.0


EntityManagers configured according to the specified persistence unit Since: JPA 1.0


Annotation Element javax.persistence.NamedQuery String name (Required) The name used to refer to the query with the EntityManager methods that create query objects. Since: JPA 1.0


javax.persistence Interface EntityTransaction Interface used to control transactions on resource-local entity managers. The EntityManager.getTransaction() method returns the EntityTransaction interface. Since: JPA 1.0 Learn how to use EntityTransaction in Chapter 3 of the ObjectDB/JPA manual. void

Best practise loading big data

this MyStepBlockCollection sbc = entityManager.find(id); for (MyStepBlock sb : sbc.stepBlocks ... above: MyStepBlockCollection sbc = entityManager.find(id); for (MyStepBlock sb : sbc.stepBlocks) { for (MyStep s : sb ... .Embeddable; import javax.persistence.Entity; import javax.persistence.EntityManager; import javax


javax.persistence Annotation PersistenceContext Target: Classes and fields (including property get methods) Expresses a dependency on a container-managed EntityManager and its associated persistence context. Since: JPA 1.0 String name (Optional) The name by which the entity manager


.persistence.EntityManager methods that take locks ( lock, find, or refresh) or to the Query

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