java - JPQL Eclipselink - How to join two tables and present items that have no items in the other table -


I would not have spoken to those who would try to select all the orders and I got an exception, I do it Can i do

It'm trying to what to do:

  select O, COUNT (B) Bidintis order-Entity Ofaid of orders BOO id = B. Order in order b) = 0 and o.kenned & lt; During a query in date order by o.created ASC exception Thread "Thread -4" java.lang.IllegalArgumentException: EntityManager is an exception was generated: Exception description: Syntax error parsing [SELECT o, COUNT (b) OrderEntity o byte oiid = b. Raidid 0 (b) = 0 and o.kennetted & lt; : Date order by O.K.AT ASS) [91, 99] COUNT functions are only allowed in SELECT, GROUP BY, ORDER BY and HAVING clauses. On SunkreflectkNativeMethodAccessorImplkinvoke (NativeMethodAccessorImplkjava:62) on sun.reflect.NativeMethodAccessorImpl.invoke0 (Basic Law) on sun.refcl.seistence.internal.jpa.EntityManagerImpl.createQuery (EntityManagerImpl.java:1605) Sun $ Expanded NTIT Annihilation on the Released.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at $ java.lang.reflect.Method.invoke (Method.javaache83) on .org.printframework.orm.jpa.ExtendedEntityManagerCreatorHandlerWenck (ExtendedInterity ManagerSaver. Java 342) sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAcce    

I can not double check this time, but the error message is quite descriptive. You can try adjusting your query like the following. :

  Select the order login Tity o Where (SELECT COUNT (b) of OrderBidEntity b WHERE o.id = b.orderId) = 0 and o.created & lt; : Date order by O.A.C.  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -