ObjectDB ObjectDB

Internal Website Search

151-160 of 200 resultsRefresh
9

openejb jpa jaas module

javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax ... EntityManager entityManager; protected Map<String, ?> sharedState = new HashMap ... ) options.get("url")); entityManager = entityManagerFactory.createEntityManager
9

Conflicting modifiers .... (javax.persistence.Id, javax.persistence.ManyToOne)

javax.persistence.Basic; import javax.persistence.Entity; import javax.persistence.EntityManager ... ") }) public class Container { public static Container getInstance(EntityManager em) { Container c ... , EntityManager em) throws TestException { if (lastInstanceInMap == null) { lastInstanceInMap
9

Visibility of changes in Transaction is not visible to a JPA QL Query

getInstance(EntityManager em) {   Singleton c = em.find(Singleton.class, "1");   if (c == null) {    c ... .lang.Integer lastInstance; public void generateItems(EntityManager em, int howMany ... (EntityManager em) {   TypedQuery<Long> q = em.createQuery("SELECT COUNT(x) FROM Item x", Long.class
9

Entity listener - event instead of object

database. I can't find the nice way to use EntityManager in EntityListener. Because of that, I can't ... . Please be more specific regarding the technical question. Do you need to obtain an EntityManager from ... to an EntityManager. support Support I know about this feature request and I'm already subscribed. The main
9

Query results are not up to date for entities, not primitives

objects and then updating them, but it should be used cautiously because bypassing the EntityManager may break its synchronization with the database. For example, the EntityManager may not be aware ... . Therefore, it is a good practice to use a separate EntityManager for UPDATE queries." support Support Ok
8

Duplicate Entity class names causes Exception in Query

static Singleton getInstance(EntityManager em) { Singleton c = em.find(Singleton.class, "1 ... ; @Basic protected java.lang.Integer lastInstance; public void generateItems(EntityManager em, int ... Item findItem(EntityManager em, int which) { TypedQuery<Item> q = em.createNamedQuery("objdbTest
8

Cannot save or update entity on Spring App

: @PersistenceContext private EntityManager em; // Stores a new guest: @Transactional ... .getRequiredProperty(PROPERTY_NAME_ENTITYMANAGER_PACKAGES_TO_SCAN)); entityManagerFactoryBean ... : public Object persist(Object guest) { EntityManager em = entityManagerFactory
1

Once served to JSF page via @EJB query bean, many list fields are null (but same query ok after fresh persist in @PostConstruct)

TestQuery { @PersistenceContext private EntityManager em; public List<Element> findElements ... . Your TestQuery class uses a transaction scope EntityManager (the default as explained ... findElements, etc. 2. Switch to extended scope EntityManager By doing that you prevent detachment on exit
1

InternalException

seems to work around the problem. In the error version I'm keeping the entityManager at the thread level ... version a new entityManager is opened & closed for each action (load, remove, etc). When an update has occurred the actions are now: Open a new EntityManager Open a new transaction Merge the updated object
1

After using the enhancer, Lazy loaded collections are no longer loading. They are set as null

Account(); entityManager.persist(account); entityManager.flush(); Project project = new Project(); project.setAccount(account); entityManager.persist(project); entityManager.flush(); account = entityManager.find(account); assertNonNull(account.getProjects()); Expected Result

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