Atitit Oodbms Query, object-oriented SQL query JPA JPQL hql

Source: Internet
Author: User
Tags comparable

Atitit Oodbms Query, Object-oriented SQL query JPA jpql hql

1.1. Standard API history 1

1.2. jpa JPQL Span style= "font-family: Arial" > ( java persistence Query Language )   comparable to Jdbc query ability     1

1.3. operating API1

1.4. Hql2

1.1. Standard API history

the standard is included in every step of the standard so JPA specification notifies all versions of JPA.

in the JPA2.0 , standard query API, query standardization development.

in the JPA2.1, standard updates and deletions (batch update and delete) are included

1.2.JPA defines a unique JPQL(Java persistence Query Language)   query capability comparable to JDBC 

JPA 's Query language is object-oriented rather than database-oriented, and it constructs query statements in object-oriented natural syntax, which can be seen as Hibernate the equivalent of HQL.

JPA defines a unique JPQL(Java persistence Query Language),JPQL is an extension of EJB QL , which is a query language for entities that manipulate objects as entities rather than tables of relational databases, and can support batch updates and modifications,joins, GROUP by , having and so usually only SQL To be able to provide advanced query features and even support subqueries.

1.3. operation API

Add em.persist (user);

User user = Em.find (user. class  , id);

1. list<user> users = em.createquery ("Select u from User u")

2. . Getresultlist ();

1.4. HQL

Reference

Jpql_ Baidu Encyclopedia . HTML

JPQL Grammar Summary -calmjava-blogjava.html

JPQL Query Statement (Java presistence query Language)(GO) --iteye Technology Web site . html

author::  Nickname :Old Wow's claws( Full Name::AttilaxAkbar Al Rapanui Attilaksachanui) 

Kanji Name: Etila ( Ayron) , email:[email protected]

reprint Please indicate source: http://www.cnblogs.com/attilax/

Atiend

Atitit Oodbms Query, object-oriented SQL query JPA JPQL hql

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.