About hints

manual

Setting and Tuning of JPA Queries

Explains various JPA query settings - result range, flush and lock.... Lock Mode (setLockMode) Query Hints Result Range (setFirstResult, setMaxResults) ... See JavaDoc Reference Page... . Query Hints Additional settings can be applied to queries via hints. ...

 
api-jpa

NamedQuery.hints

(Optional) Query properties and hints.(Annotation Element of javax.persistence.NamedQuery)

 
issue

Read only hint for query

Second thing after @FetchGroup I've found is read-only hint for EM. You can specify this hint to EM when executing query meaning that returned data will never be edited or persisted. My understanding of this is that each entity returned from query is in detached state as default state. query.setHint("odb.read-only", "true"); This could be useful in situation when you are sure, that you won't modify those entities - like listing entities, paging, logging, reporting. Feature Request Version: Priority: Normal Status: Active Replies: 0 Type:  Feature Request ...

 
api-jpa

setHint(hintName, value)

Set a query property or hint.(Method of javax.persistence.TypedQuery)

 
api-jpa

NamedNativeQuery.hints

Query properties and hints.(Annotation Element of javax.persistence.NamedNativeQuery)

 
api-jpa

setProperty(propertyName, value)

Set an entity manager property or hint.(Method of javax.persistence.EntityManager)

 
api-jpa

setHint(hintName, value)

Set a query property or hint.(Method of javax.persistence.Query)

 
forum_thread

Is 2 level cache in use?

Hi, Is there any way to check, if 2 level cache is in use? Right now I've done two things: 1. objectdb.conf with cache size is placed in WEB-INF directory of my web application. 2. persistence.xml was modified with: ... regarding this feature was added to the Query Hints section. It is now supported in all scopes (e.g. also globally ...

 
api-jpa

javax.persistence.TypedQuery

Interface used to control the execution of typed queries.(Interface of JPA)

 
forum_thread

NULL prefered in ORDER BY?

Hi! Is there a way to NOT prefer NULL in Order BY? I.e. assume this: @Entity class Hint { private String name; } @Entity class Test { private Hint hint; } I've got a few Test entries, some do have a hint assigned, some do not (NULL). Now when I do something like SELECT FROM Test ORDER BY hint.name #1 2011-12-06 01:18 Hi! Is there a way to NOT prefer NULL in Order BY? I.e. assume this: @ Entity class ...