Home » Search

About SELECT

191-200 of 200Refresh
Issue
2

JPQL support for mapped by (inverse) collections

query = em.createQuery(         //    "SELECT a FROM A a WHERE a.list IS EMPTY");         //System.out.println(query.getResultList().size());         // SELECT a FROM A a WHERE a.list IS NOT EMPTY         List list1 = em.createQuery(             "SELECT DISTINCT b.a FROM B b", A.class
Forum
2

Listing large number of complicated objects with paging.

with such a simple query: select prod from Product prod order by prod.id ASC Right now I have 55541 ... .createQuery("select prod from Product prod order by prod.id ASC", Product.class); prodList = icQuery ... .578 [http-bio-8080-exec-3] DEBUG pl.hplxtool.dao.impl.ProductDAOImpl - Query: [select prod from
Forum
2

New to Product & Having An Issue

({ @NamedQuery(name="Department.findAll", query="SELECT d FROM Department AS d"), @NamedQuery(name="Department.byName", query="SELECT d from Department AS d WHERE d.name = :name"), @NamedQuery(name="Department.findByCmpPK", query="SELECT d FROM test.Domain.Department AS d
Forum
2

No clue how to query with collection

> getAddresses(); } Now what I want to do is to select all available Customer Entites and ORDER them by ... null). So I want something like this: SELECT c, a FROM Customer INNER JOIN c.addresses ORDER BY ... that selecting the first item of a collection ain't be a good idea. now I can select the right item
Forum
2

Strange behaviour with ORDER BY and IN

("Locations without selection criterion in descending order (by id): ");         em.createQuery("select ... selection criterion ON ID-FIELD in descending order (by id): ");         em.createQuery("select l from ... ("\nLocations with IN selection criterion ON NON-ID-FIELD in descending order (by town): ");         em
Forum
2

Problem with entities detection

") @XmlRootElement @NamedQueries({ @NamedQuery(name = "Alumno_odb.findAll", query = "SELECT a FROM Alumno a") , @NamedQuery(name = "Alumno_odb.findByDni", query = "SELECT a FROM Alumno a WHERE a.dni = :dni") , @NamedQuery(name = "Alumno_odb.findByNombre", query = "SELECT a FROM Alumno
Forum
2

Criteria Query results in a NoResultException instead of returning object

); criteria.select(root); List predicates = new ArrayListSELECT $1 FROM IdentityObject $1 ... to the following JPQL query: SELECT $1 FROM IdentityObject $1 WHERE $1.name='demo' You have to use
Forum
2

Missing Data on Retrieval (0, null values)

> resultList = em.createQuery("SELECT q  FROM "+tableName+" "+n).getResultList();   exportToCSV ... : List resultList1 = em.createQuery("SELECT p  FROM Person p").getResultList();     -> resultlist1   OK List resultList2 = em.createQuery("SELECT d  FROM Document d" ).getResultList
Forum
2

Performance in large transactions

and between the creations we call a select query. The execution of the query becomes slower at each ... (); transaction.begin (); // the "problem" Query Entity2 x = //query (getSingleResult): "select e ... <100; i ++) {     // the "problem" Query     Entity2 x = //query (getSingleResult): "select e from
Forum
2

Searching lists within objects

.get("name"), "lastname")                 )             );                 q.select(cdi).where(pred ... ("wbaldwin", "William", null, "Baldwin", true);                 String query = "SELECT DISTINCT t FROM ... );         assertEquals(1, searchResult.size());                 query = "SELECT DISTINCT t FROM com.contextspace