JPQL: The Basics of the Java Persistence Query Language

preview_player
Показать описание
The following tutorial details how to use JPQL to query an object model. It explores JPQL basics and discusses the risk of SQL Injection.
Рекомендации по теме
Комментарии
Автор

Muy bien explicado, aún sin entender completamente el inglés, entendí completamente cómo se usa en términos básico el JPQL. Espero la segunda parte =D.
Muchas Gracias!

leguxrap
Автор

Done thanks
Shows using named parameters (which we have with springs @query)


We don’t have to explicitly join, for example doing select p from Post p where p.author.name=... this joins post and author and selects based on author name column.
So we can chain object references like this and jpql will do the joins for us

mostinho
Автор

I like to query multiple tables with JPQL ?
I want to show the name, not the id . with SQL I do so :
mysql_query("SELECT campo1, campo2, campo3, campo4, table2.campo,
table3.campo, tabla4.campo
FROM tabla1, tabla2, tabla3, tabla4
WHERE (campotabla1 = tabla2.idcampol) AND (campotabla1= tabla3.idcampo) AND (campotabla1= tabla4.idcampo)")

thank you for your Help !!!

dai
welcome to shbcf.ru