• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Doubt in Enthuware question  RSS feed

 
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, in the following question:


Identify FALSE (i.e. INCORRECT) statements about JPQL.
A) It can be used to select values only from tables that have been mapped to the abstract persistent schema.
B) Insert statements are not supported by JPQL. New rows can be created in the database using em.persist() operation.
C) It can be used to insert new rows into the database.
D) It can be used to update EJB 3.0 Entities.
E) It can accomodate complex joins involving multiple tables.
F) JPQL queries are compiled into the database specific SQL queries by the container.
G) All containers must support JPQL as specified in the EJB Specification so it is vendor independent.
H) It is vendor independent.



according to the simulator the correct answer is (B) and yes I agree with that, however can't I consider also the answer (A) ?? for example can't I access tables that are not mapped to the abstract persistent schema using native SQL language ?? using EM.createNativeQuery ??

 
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using a native query is not like using JPQL. These are two differents beasts. The question is about JPQL only, not native queries. So I think that A is true. With JPQL, you can only access tables that have been mapped to the abstract persistent schema.
 
Omar Al Kababji
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you, so native SQL queries created by the entity manager are not considered as part of the JPQL
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!