Executing JPQL and Native Queries with Spring Data JPA | @Query @Param Annotations | Spring boot

Поделиться
HTML-код
  • Опубликовано: 2 окт 2024
  • In this video we are going to learn how to execute jpql(hql) and native queries with spring data jpa
    Executing JPQL and Native Queries with Spring Data JPA | @Query @Param Annotations | Spring boot
    #springboot #spring boot tutorial
    Download Source Code: learncodewithd...
    Spring-boot full playlist: • Spring Boot Tutorial i...
    Spring MVC playlist: • Spring MVC Tutorial St...
    Spring framework playlist: • Spring Framework Tutor...
    MySQL in one video: • Learn MySQL in one vid...
    Telegram Link for Doubt: t.me/learncode...
    Important Videos:
    ➡️React JS with Project: • 🔥 🔥 Complete React Js ...
    ➡️Learn JDBC in one video: • JDBC Crash Course in 1...
    ➡️Learn Python in One Video: • Learn Python in One Vi...
    ➡️Learn HTML in one video: • Jquery in one video in...
    ➡️Learn HTML form in one video: • Jquery in one video in...
    ➡️Learn JavaScript in one videos: • Learn JavaScript in O...
    ➡️Learn Form Validation using javascript and jquery: • Form Validation using ...
    ➡️Learn CSS in one video: • Jquery in one video in...
    ➡️Jquery in one video: • Jquery in one video in...
    ➡️Kotlin is one video: • Kotlin | Learn Kotlin ...
    ➡️Complete Python Project - RUclips downloader in one video: • Jquery in one video in...
    Important Playlist:
    ➡️Spring Boot Tutorial with Project : • Spring Boot Tutorial i...
    ➡️Spring MVC Tutorial: • Spring MVC Tutorial St...
    ➡️Complete Spring Framework Tutorial: • Spring Framework Tutor...
    ➡️Hibernate Tutorials: • Hibernate Tutorial for...
    ➡️E-Commerce Project using Java: • E-Commerce Project usi...
    ➡️AWS Free Java Hosting Playlist: • AWS Hosting Tutorial |...
    ➡️Hibernate Tutorial Playlist: • Hibernate Tutorial for...
    ➡️Learn Technology in One Vides: • Learn in one video : C...
    ➡️Programming Tips for Programmers: • Coding Tips and Discus...
    ➡️Complete Python for Beginners: • Complete Python Tutori...
    ➡️Important Python Projects: • Python Projects in Hindi
    ➡️Complete Servlet & JSP : • Servlet and Jsp (Serve...
    ➡️Complete JDBC ( Java Database Connectivity) : • JDBC(Java Database Con...
    ➡️Complete Java Project : TechBlog: • Full Java Advance Pro...
    ➡️Java Swing Projects: • Java Projects for begi...
    ➡️Java Core Concepts: • Java Core Tutorial
    ➡️Kya aap Jante hai Series: • kya app jante hai : s...
    Important Links:
    👉Official Website (Source Code): learncodewithd...
    👉Telegram Discussion Group: t.me/learncode...
    👉Follow me on Instagram: / durgesh_k_t
    👉Follow on Facebook / learncodewithdurgesh
    Gear that I use:
    Gears that I Use:
    Lenovo Ideapad S145 AMD Ryzen 5 15.6
    amzn.to/33Vvxu2
    Mic for Recording
    amzn.to/305hgtr
    amzn.to/2EyFMfa
    Disclaimer:
    All videos are for educational purposes and use them wisely. Any video may have a slight mistake, please take decisions based on your research. This video is not forcing anything on you.

Комментарии • 138

  • @rishisrivastava5461
    @rishisrivastava5461 2 года назад

    Thanks sir, appreciate your efforts.

  • @chirasmitasahoo2157
    @chirasmitasahoo2157 3 года назад

    Thanks a lot dear,your exaplanation is amazing .

  • @Islamicnoor-09
    @Islamicnoor-09 3 года назад

    nice and very well explaination

  • @utshabroy
    @utshabroy 4 года назад

    Very good content. Really appreciate it.

  • @atulpunde4786
    @atulpunde4786 3 года назад

    Awesome video

  • @Vinu-Arts
    @Vinu-Arts Год назад

    Thank you so much sir.........

  • @mayureebawane1938
    @mayureebawane1938 4 месяца назад

    Thanks alot sir!!!

  • @AnkitKumarCoder
    @AnkitKumarCoder 3 года назад

    Thank you for this series.

  • @prathameshwaghmare5846
    @prathameshwaghmare5846 3 года назад

    Thanks a lot brother

  • @ashishmahanta7963
    @ashishmahanta7963 Год назад

    Please sir make a video how to get data from multiple tables using queries

  • @dpm_07
    @dpm_07 2 месяца назад +2

    Thanks for this good and simple explanation
    Looking for simple reactive programming in Java

  • @techgyan6233
    @techgyan6233 3 года назад +6

    Sir muje doubt h, jo Data pass kar rahe h agar vo table me preset Nhi to usse kese handle karenge plz give some ideas for this.

  • @killerb456
    @killerb456 7 месяцев назад

    Thumbs up, piya koroh!!!

  • @cineyouworld3107
    @cineyouworld3107 4 года назад +2

    Mere pass ek database hai ussme 20 schemas hai...aur ek table hai jo inn saare schemas mein hai,toh ab @Query mein native query likhta hu mein kch aise @Query(value="select * from schemaname.tablename",nativeQuery=true)
    Ab issue yeh hai ki mujhe har schema k liye yeh seperately likhni pad rahi hai...means 20 @Query use karna padh raha hai.....koi aise tareeka hai ki jisse query mein schemaname dynamically de saku...kisi parameter se ya fir properties file se??
    Database Postgres hai

  • @vatsamaitrayee6147
    @vatsamaitrayee6147 4 года назад

    Plez make more video on new projects with angular js

  • @shubhamsinghal3326
    @shubhamsinghal3326 3 года назад +10

    Those who have learn Spring MVC can relate how easy is this :D

  • @codingpanda6145
    @codingpanda6145 9 месяцев назад

    what about parameterized native query

  • @dinarulhasan4049
    @dinarulhasan4049 Год назад

    (No property 'city' found for type 'User' )when we use two parameater custom finder method plz give sollution

  • @RishiRaj-ex9wb
    @RishiRaj-ex9wb 2 года назад

    @Query ke Bina bhai aisle hi chal rahe the methods; @Query Jodie she kya benefits?!

  • @benmansourmahdi9097
    @benmansourmahdi9097 2 года назад +1

    title and description in english but talks idian !! very smart

  • @elitexmedia2899
    @elitexmedia2899 3 года назад

    Can we also fire HQL instead of JPQL, in this case?

  • @rajput3281
    @rajput3281 3 года назад +2

    sir can you tell me how can we query using multiple tables...using jpql or native

  • @namoshelke4983
    @namoshelke4983 4 года назад +2

    Bhai bahut sahi batha rahe ho...I m very happy aap har 1 video mere liye bahut important hai..thank u so much

  • @preyas2198
    @preyas2198 3 года назад +4

    What an amazing explanation bro... Keep it up.. I've searched this topic everywhere in google from last 2 days & now I cleared my all doubts regarding JPQL & native query.. Many any Thanks to you....

  • @indlasubramanyam9510
    @indlasubramanyam9510 3 года назад +5

    No words to say..thank you is the small word for your efforts. 🙏🙏

  • @JasonTaylor-l2w
    @JasonTaylor-l2w 20 дней назад

    Madge Wells

  • @LalitKumar-mq5oi
    @LalitKumar-mq5oi 2 года назад

    How to fill all input fields automatically from the database by entering input in one textbox using Spring boot?

  • @Pk-nz8nx
    @Pk-nz8nx 4 месяца назад +2

    very helpful video ,thankyou sir

  • @sunrisegoldpanwar5342
    @sunrisegoldpanwar5342 4 года назад +1

    Sir, format HDD local drive se data recover kiya ja sakta he programing ke dwara

  • @shubhamgupta8769
    @shubhamgupta8769 3 года назад +2

    How to write a hibernate query if we have implemented onetomany or onetoone mapping, suppose on that query we need to transfer some param based on joins tow tables. Thank you so much

  • @teamrocket0002
    @teamrocket0002 Год назад +1

    Nice video...One doubt, Suppose my table name is different from the Entity name, then how will i write the @Query?

  • @rohitprajapati1113
    @rohitprajapati1113 2 года назад

    Sir I want data of specific column present in database how can i get it.
    Please help me.

  • @maheshdeoraye6660
    @maheshdeoraye6660 3 года назад

    jpql queries are case sensitive? I have not seen hibernate bt please do help in some cases it dont work it there any standards writing jpql queries

  • @prashantpatidar1099
    @prashantpatidar1099 Год назад

    Please explain how to map result of JPQL query to DTO.
    **I know how to map native query result to DTO.

  • @NihalSingh-ld2en
    @NihalSingh-ld2en 3 года назад +1

    Join kaesae kare

  • @chandreshvikram9344
    @chandreshvikram9344 4 года назад +1

    Please make one web application using spring boot sir!!

  • @prisinha
    @prisinha 3 года назад +1

    7:47 D capital

  • @bipashanaskar4898
    @bipashanaskar4898 2 года назад

    native query not working? giving error while compling

  • @Sonkamble92
    @Sonkamble92 6 месяцев назад +1

    How to convert this native query response into json response

  • @pragyarana1241
    @pragyarana1241 2 года назад

    Hi,
    I need some help actually I want to write a query like there are more than 50 column and there are status of 1 id as pending , pending authorization and completed . There can be more than one event whose id is 1 and status is pending because when a user approved that event then status will be changed to pending authorization or completed so I want to to retrieve only those events whose status is still only those pending which are not converted into pending authorization or completed .
    Please give me some idea that how can I do that

  • @vaishalibhoir7809
    @vaishalibhoir7809 8 месяцев назад

    After installation mysql workbench , when I am cheking DB show --error 1045 (28000)access denied for user 'root@localhost' (using password :YES) how to resolve this error for windows , can you please help me

  • @SharpViola-g6d
    @SharpViola-g6d 29 дней назад

    Davis Jeffrey Wilson Paul Martin Elizabeth

  • @monirmusa4589
    @monirmusa4589 2 года назад

    how use ROW_NUMBER() OVER (Order By id DESC) serial

  • @UmarFarooq-un6jm
    @UmarFarooq-un6jm Год назад

    I have a table which looks like this
    Table :
    id | data
    1 | { "name" :"abc","class":"123" }
    2 | { "name" :"def","class":"456 }
    data type of id = varchar data type of data = json
    i am using native query in jpa like this
    @Query(value =
    "select data from Table where id=:id"
    ,nativeQuery = true)
    JSONObject findData(@Param("id") String id)
    My question is the native query going to return me a JSONObject or a jsonObject in stringified form.if it returns me stringified form should i change return type of native query like this
    String findData(@Param("id") String id)

  • @AngelineAlvarez-k2c
    @AngelineAlvarez-k2c 17 дней назад

    Wilson Gary Perez Kimberly Young Paul

  • @NancyMendozai
    @NancyMendozai 16 дней назад

    Harris David Anderson Thomas Lopez Sharon

  • @grandselenium296
    @grandselenium296 2 года назад

    Just wanted to say, if anyone gets this error :(Project configurator "org.eclipse.m2e.wtp.jaxrs.configurator" required by plugin execution "org.apache.maven.plugins:maven-jar-plugin:3.2.2:jar (execution: default-jar, phase: package)" is not available. To enable full functionality, install the project configurator and run Maven->Update Project Configuration.) on their project pom.xml tag, then the solution is to install m2e-apt plugin from eclipse marketplace and then run maven project an update it.
    If you have the error eventhough m2e-apt is installed, then you have to go into properties for the project -> Maven -> Annotation Processing -> click enable project specific settings and the Automatically Configure JDT APT should be select -> Apply and Close.

  • @JeffreyGarcia-l3w
    @JeffreyGarcia-l3w 26 дней назад

    Jones Ruth Thomas Sandra Anderson Cynthia

  • @pratikshanmalakar4605
    @pratikshanmalakar4605 2 года назад

    sir native query me..when im writing --- select * from user where name=x after binding x to param ..its not running
    ...but if i change it to select * from user where name=:x then it ran..... but native query me :x dalke address karna th nhi chahie right ?

  • @bhargavibujji6109
    @bhargavibujji6109 Год назад

    Could you plz explain How to get particularly sepicified columns (or) field without any pass like findbyid or etc ...I just give url in postman when ever I send tha request ..output will be come in json format just specified columns data

  • @AngelineAlvarez-k2c
    @AngelineAlvarez-k2c 25 дней назад

    Jones Mark Martinez Robert Walker Michael

  • @JamesTeeter-t9c
    @JamesTeeter-t9c 28 дней назад

    Davis Melissa Williams Deborah Gonzalez James

  • @МарионеллаЯцкевича
    @МарионеллаЯцкевича 12 дней назад

    Williams Patricia Allen Carol Walker John

  • @TerryMuriel-l8s
    @TerryMuriel-l8s 17 дней назад

    Jackson Linda Moore Carol Young Ronald

  • @priyamsrivastava4948
    @priyamsrivastava4948 Год назад

    I have a doubt
    If I want to get the data from the database on the basis of foreign key then how can I do so?
    I mean in where clause I have foreign key, it's not present in my POJO class.

  • @rupasingla9494
    @rupasingla9494 2 года назад

    Kindly reply coz if one practical not work,we are not able to see next videoes,my save all function is not working.

  • @SlBoss14
    @SlBoss14 Год назад

    Is it possible to write query in property or yaml file and fetch value from it like @Query(${query})? Please reply

  • @Cheryle-x5c
    @Cheryle-x5c 21 день назад

    Hall Eric Williams Carol Lee Kimberly

  • @akhiljanagam355
    @akhiljanagam355 Год назад

    Why he used a foreach loop can anybody explain please

  • @IntelliCode-r2o
    @IntelliCode-r2o Год назад

    please sir make a separat playlist for jpql all possible case

  • @mukultanwar8723
    @mukultanwar8723 6 месяцев назад

    help me out sir i created 2-3 project i got same error

  • @AsfZxc-h4i
    @AsfZxc-h4i 22 дня назад

    Thomas Nancy Clark Christopher Gonzalez Frank

  • @gauravlogin8
    @gauravlogin8 3 года назад

    thanx for the video .
    if i want current day data list from database (using date from date-picker) in SpringBoot thyme leaf.
    please provide me solution.

  • @snehassnehas5065
    @snehassnehas5065 2 года назад

    Please do provide all these videos in english

  • @amansinha3629
    @amansinha3629 11 месяцев назад

    How about if I have another entity inside User let’s say department and we want to find User with department name ‘arts’? Consider a one to one mapping between two tables.

  • @mynkprtp
    @mynkprtp Год назад

    11:20
    are these operations not case sensitive ??
    for a query to work, it should match exact value.

  • @ramshishyaprasad5826
    @ramshishyaprasad5826 2 года назад

    how do you pass dynamic argument into native query i am trying it but getting value as ? in parameter place holder value
    ?

  • @rahemanrf5775
    @rahemanrf5775 11 месяцев назад

    Where we can learn that querys

  • @nefarious001
    @nefarious001 2 года назад

    Arey bhai pichle video ki link i button pe dalna kaise vul gaye??

  • @shubham8130
    @shubham8130 2 года назад

    I want to type the query in angular and send it to Spring so that spring will run the query. Can you please tell me how to do it?

  • @mukultanwar8723
    @mukultanwar8723 6 месяцев назад

    Hii sir , i got error No qualifying bean of type 'com.jpa.dao.UserRepository' available how to resolve it

    • @mayyyank27
      @mayyyank27 6 месяцев назад

      brother just re-arrange the file structure for the packages, first com.jpa.test -> com.jpa.test.dao ->com.jpa.test.entities

  • @antaradey2820
    @antaradey2820 3 года назад

    Hi , we have a query like below , as we have sql query in database , i need to execute the query using jpa as input , how i need to run .

  • @atharraza8640
    @atharraza8640 3 года назад

    Please sir Spring boot scheduler ka video banadigye

  • @nagalakshmibutti8067
    @nagalakshmibutti8067 2 года назад

    can you please explain operations using UPDATE? BTW the video was excellent Thank you keep it up bhai.

  • @CharlesAmill-o5x
    @CharlesAmill-o5x 10 дней назад

    Lee Fort

  • @RosarioSannicolas-n7f
    @RosarioSannicolas-n7f 20 дней назад

    Gideon View

  • @akash-lz2dq
    @akash-lz2dq 2 года назад

    sir address toh do tabhi thumps up de paaynge aapko .

  • @CHPK-STEPLER
    @CHPK-STEPLER Год назад

    @Query("SELECT cl FROM Cliente cl WHERE cl.__state = 'activo' AND cl.__erp = :erpCode ")
    public List getByErp(@Param("erpCode") String erpCode);

  • @rahul-java-dev
    @rahul-java-dev 4 года назад

    Awesome Sir ji....Thank thank u so much for making things really very simpler.

  • @rohitmanohar2733
    @rohitmanohar2733 3 года назад

    Hi Bro, can u make video where if we wanted to have subquery with params , joins then how to do that

  • @VikashSingh-jh3jz
    @VikashSingh-jh3jz 4 года назад

    I am stuck in my spring boot app , json data in not showing up . please help

  • @initToLearn
    @initToLearn 2 года назад

    can you please explain How to use parenthesis in JPQL for and or conditions

  • @ChetanRawattunein
    @ChetanRawattunein 3 года назад

    Hi,
    I am writing a query to fetch 2to3 columns from db to jpa
    but gets error: could not execute query. but it works on inbuilt jpa functions
    public interface ClientRepo extends JpaRepository{
    @Query(value="select Account_Balance, status from client_records", nativeQuery = true)
    List fetch();
    @GetMapping("/prefund")
    public List fetchPrefundBalance(){
    return clientRepo.fetch();
    }
    can u please help

    • @krishnasaic
      @krishnasaic 2 года назад

      For me also have similar execution requirement. How did u do after that did it work, of yes please share that query

  • @DivineInfosec
    @DivineInfosec 2 года назад

    you saved my lots of time. thanks alot bro.

  • @MayurBhaisare
    @MayurBhaisare Год назад

    Big shoutout Man

  • @GenevieveWhite-r6n
    @GenevieveWhite-r6n 23 дня назад

    Allen Sandra Anderson Donna Moore Brenda

  • @learn_with_san
    @learn_with_san 11 месяцев назад

    Clear explanation bhai : Jai Hind : Jai Bharat 🦚

  • @tanyajain4123
    @tanyajain4123 2 года назад

    Which is better using prepared statement or jpa ?keeping sql injection in mind

  • @cricketalltime5447
    @cricketalltime5447 2 года назад

    Hql ke liye link dijiye

  • @apsprojects.6331
    @apsprojects.6331 Год назад

    Thank you Sirjiii👌🏻👌🏻👌🏻

  • @tejaspecial202
    @tejaspecial202 Год назад

  • @Life-GiftOfGod
    @Life-GiftOfGod 3 года назад

    how can we handle procedures please?

  • @rahulnarahari5124
    @rahulnarahari5124 3 года назад

    bhai bahot acha explain kiya aapnay...

  • @ChandraSekhar-ki3iz
    @ChandraSekhar-ki3iz Месяц назад

    Nicely explained.

  • @vikupilot
    @vikupilot 3 года назад

    Very nice tutorial .. exactly what I want to learn ...cool

  • @sandeshkumar9156
    @sandeshkumar9156 3 года назад

    You beauty bro, loved it.

  • @eidolonmix869
    @eidolonmix869 4 года назад

    can you make a tutorial on command promt plz?

  • @ChandraSekhar-ki3iz
    @ChandraSekhar-ki3iz 2 месяца назад

    Nicely explained.

  • @ms_barsha2416
    @ms_barsha2416 Год назад

    Thank you sir❤

  • @prisinha
    @prisinha 3 года назад

    11:07 double quotes