Pergunta

Hi I am a newbie using persistence API, and have also read few posts related to the same and got a very few understanding between these two. the below post really helped me clear my concepts for @NamedQuery What is a named query? I now wanted to learn all the important key differences between NamedQuery and NamedNativeQuery, and which one is preferred most while dealing with JPA-QL, and performance wise.

Thanks!

Foi útil?

Solução

A native query isn't JPQL. A regular query is converted by the persistence provider into something the underlying persistence system understands (such as SQL SELECT, or a NoSQL retrieval). A native query, while not portable, is written directly in the native language of the store so that you can use special features (like PostgreSQL's IP address manipulation) at the cost of portability.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top