About getSingleResult

51-60 of 91Refresh
Forum
2

Remove a modified entity cause an optimistic lock exception

").getSingleResult();         e.increaseValue();         e = (MyEntity)em.createQuery("select m from MyEntity m").getSingleResult();         em.remove(e);         em.getTransaction().commit
Issue
2

Server crash - Mismatch client-server protocol prefix

-server protocol prefix (error 523) at com.objectdb.jpa.JpaQuery.getSingleResult(JpaQuery ... ) at com.objectdb.jpa.JpaQuery.getSingleResult(JpaQuery.java:716) ... 27 more   I
Forum
2

Tutorial issue

) at com.objectdb.jpa.JpaQuery.getSingleResult(JpaQuery.java:754) at tutorial.Main.main(Main ... .getSingleResult(JpaQuery.java:747) ... 1 more   As the error message indicates you have two different
Forum
2

TYPE Expression

) at com.objectdb.o.OBC.onObjectDBError(OBC.java:1485) at com.objectdb.jpa.JpaQuery.getSingleResult ... .jpa.JpaQuery.getSingleResult(JpaQuery.java:695)   any idea??? Alex Even this simple code causes
Forum
2

Using the wrong class to access a database

Point p"); System.out.println("Total Points: " + q1.getSingleResult()); // 2 Query q2 ... .getSingleResult()); // 3 get all points TypedQuery query = em.createQuery("SELECT p FROM
Issue
2

Unexpected error when loading all entity instance

.objectdb.o.QRR.f(QRR.java:153) at com.objectdb.jpa.JpaQuery.getSingleResult(JpaQuery.java:750) at com.querydsl.jpa.impl.AbstractJPAQuery.getSingleResult(AbstractJPAQuery.java:183) at com.querydsl.jpa
Forum
1

Activation key causes database to not start

: boolean isActivated = em.createQuery("objectdb activation", boolean.class).getSingleResult(); Perfect! Thank you. CK1000 zmirc
Forum
1

Broken @ManyToOne reference

.createQuery("SELECT  e FROM Child e", Child.class).getSingleResult(); because Main.CHILD_ID
Issue
1

Can't open replicated database

) at com.objectdb.jpa.JpaQuery.getSingleResult(JpaQuery.java:654) at rbccm.felix.objectdb.messaging
Forum
1

Cannot catch a PersistenceException and continue the transaction

I try to create a factory that creates new objects just in case it doesn't find the relevant one in the DB. but because query.getSingleResult() fires NoResultException in that case it marks the transaction as one that need to be rolled back. I understood that I can overcome it in several ways