• 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:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Doubt in Enthuware question

 
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 VI Editor Ubuntu
  • 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
 
I think he's gonna try to grab my monkey. Do we have a monkey outfit for this tiny ad?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic