About execute

forum_thread

Check for index existence ?

Hello, Is there a simple way to check if indexes specified in entities are well taken into account by ObjectDb ? Regards, Xirt ... including usage of indexes: When you execute a query in the Explorer in the log pane. In the log file ...

 
api-jpa

javax.persistence.criteria.CriteriaBuilder

Used to construct criteria queries, compound selections, expressions, predicates, orderings.(Interface of JPA)

 
manual

Index Definition

Describes how to define indexes in JPA entity classes and explains how indexes are used in JPQL queries. Querying without indexes requires iteration over entity objects in the database one by one. This may take a significant amount of time if many entity objects have to be examined. Using proper indexes the iteration can be avoided and complex queries ov ...

 
forum_thread

Level 2 cache not hit in @ManyToOne

Hi! I have 2 entities: User and Item, both @Cacheable. Item has @ManyToOne private User user. Level 2 JPA cache is activated and it works ok for find by id (tested by changing data in explorer and reading in my app). Problem 1: find by id on Item it's good, it hits the cache, but not for its field "user". "user" is loaded each time from the DB (tested by changing data in explorer and reading in my app). "user" should also be taken from L2 cache, shouldn't it? Otherwise...it's a huge performance hit. #1 2013-07-26 10:56 Hi! I have 2 entities: User and Item, both @Cacheable. Item has @ManyToOne private User user. Level 2 JPA ...

 
api-jpa

javax.persistence.NonUniqueResultException

Thrown by the persistence provider when Query.getSingleResult() or TypedQuery.getSingleResult() is executed on a query and there is more than one result from the query.(Exception of JPA)

 
forum_thread

performance limit

Hi, can someone share expirience with performance limits of ObjectDB especialy when quering tables with large records sets. Our issue is with tables with 100.000+ records. Everything was OK when we had few thousand records. We have a simple SELECT statement which selects from a table with 100.000+ records by UserID atribute, tables have from 5 to 20 atributes. Usualy the results range from few hundred to few thousand records. This query takes up to 12 seconds. Is this normal, what when we will have few milion records, how to handle this. ... the Explorer result data is always loaded lazily). You may execute queries in the application with lazy result loading, using the ...

 
forum_thread

UserException - Object User#2 belongs to another EntityManager

Hi! Scenario's steps: 1. User goes to his profile, a JSF page. 2. @RequestScoped CDI bean UserDataB loads the current user of the session at each request, by using @Stateless bean UserC#findUserById(Long id) 3. JSF page's @RequestScoped CDI bean AnotherB loads trades of that user, by using @Stateless bean TradesC#findTradeByClient(User u). ### UserC and TradesC have their own @PersistenceContext EntityManager with the same unitName. ... org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:116) at ...

 
api-jpa

javax.persistence.NoResultException

Thrown by the persistence provider when Query.getSingleResult() or TypedQuery.getSingleResult()is executed on a query and there is no result to return.(Exception of JPA)

 
forum_thread

InternalError on multiple AND and JOIN Query

Hi, Using objectdb 2.2.8_06. Running the following query: SELECT DISTINCT $1 FROM CDI $1 JOIN $1.contactDetails $2 JOIN $2.addresses $3 JOIN $3.attributeList $4 JOIN $2.phoneNumbers $5 JOIN $5.attributeList $6 WHERE ((($4.name='suburb') AND ($4.valueAsString='Los Angeles')) AND (($6.name='areacode') AND ($6.valueAsString='310'))) Getting: #1 2011-07-22 01:36 Hi, Using objectdb 2.2.8_06. Running the following query: SELECT DISTINCT $1 FROM CDI $1 JOIN $1. ...

 
api-jpa

javax.persistence.criteria.CriteriaQuery

The CriteriaQuery interface defines functionality that is specific to top-level queries.(Interface of JPA)