About SELECT

tutorial

JPA Web App Tutorial - IntelliJ Project

Opening a JPA Maven web application project in the IntelliJ IDEA.... . Open the project in IntelliJ IDEA: Select File > Open Project... . Select the guestbook-web directory and click OK . ...

 
tutorial

Spring MVC JPA Tutorial - IntelliJ Project

Opening a Spring MVC JPA Maven web application project in the IntelliJ IDEA.... (7KB) . Open the project in IntelliJ IDEA: Select  File > Open Project... . Select the  guestbook-spring directory and click  OK . Define ...

 
api-jpa

javax.persistence.criteria.AbstractQuery

The AbstractQuery interface defines functionality that is common to both top-level queries and subqueries.(Interface of JPA)

 
tutorial

Java EE 6 JPA Tutorial - IntelliJ Project

Opening a Java EE 6 JPA Maven web application project in the IntelliJ IDEA.... Project (6KB) . Open the project in IntelliJ IDEA: Select  File > Open Project... . Select the  guestbook-jee6 directory and click  OK . Define ...

 
tutorial

Getting Started with JPA - IntelliJ Project

Opening a JPA Maven console project in the IntelliJ IDEA IDE.... Project (3KB) Open the project in IntelliJ IDEA: Select File > Open Project... . Select the points-console directory and click Open Project . Run ...

 
tutorial

Getting Started with JPA - NetBeans Project

Opening a JPA Maven console project in the NetBeans IDE.... Project (3KB) Open the Maven project in NetBeans: Select File > Open Project... . Select the points-console directory and click Open Project . Run ...

 
forum_thread

Possible issue with timestamps

Hi, If I query doing something like: select c from CDI c where c.creationDate > {ts '2012-03-29 11:00:00} and c.creationDate < {ts '2012-03-29 12:00:00'} the test fails. Its ONLY for 12:00:00. When I started digging I found that if I queried 00:00:00 to 00:25:00 and then did 12:00:00 to 12:25:00 I got IDENTICAL results. For some reason 12:00:00 is being treated the same as 00:00:00. All other hours seem to be fine. ... Hi, If I query doing something like: select c from CDI c where c.creationDate > {ts '2012-03-29 11:00:00} and ... other hours seem to be fine. Thankfully if I do: select c from CDI c where c.creationDate > :startDate and c.creationDate ...

 
api-jpa

javax.persistence.EntityResult

Used to map the SELECT clause of a SQL query to an entity result.(Annotation of JPA)

 
forum_thread

Subquery error

My query: TypedQuery<Station> query = em.createQuery("SELECT p FROM Station p WHERE rid = (SELECT p FROM Station p where tpl='York') AND tpl != 'York'", Station.class);   Error: ... query = em. createQuery ( "SELECT p FROM Station p WHERE rid = (SELECT p FROM Station p where tpl='York') AND tpl != 'York'" , Station. class ... Exception in thread "main" [ObjectDB 2.6.6_04] SELECT p FROM Station p WHERE rid = ( ==> SELECT <==  p FROM Station ...

 
forum_thread

Slow searching with two indexes

I'm running queries on a large database (tens of millions of objects), and I'm running into a performance problem using two indexes.  An entity I'm querying has two indexed fields - one is the primary key (id) and so is different for each object, and the other is an object reference that only has a few tens of different values.   When I query by just the primary key, it's (of course) extremely fast, but when I also query using the other key, queries can take minutes.... number of the most recent objects, like this: select from Thing where reference == :objectReference order by id desc  ... plan from the log? The following query: SELECT FROM Thing WHERE reference == :objectReference ORDER ...