Spring Data MongoDB Queries | Criteria queries | @Query Annotation | Aggregation with MongoTemplate

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ก.ย. 2024
  • You will learn querying documents with Query and Criteria classes, regular expressions using $regex, and aggregation with MongoTemplate.
    My Top Playlists:
    Spring Boot with Angular : • Spring Boot + Angular
    Spring Boot with Docker & Docker Compose : • Spring Boot Docker & D...
    Spring Boot with Kubernetes : • Spring Boot Docker Kub...
    Spring Boot with AWS : • Spring Boot + AWS
    Spring Boot with Azure : • Spring Boot Azure
    Spring Data with Redis : • Spring Data with Redis
    Spring Boot with Apache Kafka : • Apache kafka
    Spring Boot with Resilience4J : • SpringBoot Resilience4j

ความคิดเห็น • 17

  • @sanyammadaan2396
    @sanyammadaan2396 2 ปีที่แล้ว

    Great Work 👍

  • @parthec1
    @parthec1 2 ปีที่แล้ว

    Thank u for video, i feel you need to explain the use case whihc you want to demo in video,then end use(group by case was not clear.

  • @manideepkumar959
    @manideepkumar959 2 ปีที่แล้ว +1

    wow u told lot many ,is there any complete list of when to use which, i felt it is small lecture, can u do big detailed lecture

  • @sumitkaintura8366
    @sumitkaintura8366 2 ปีที่แล้ว

    thanku

  • @acessosan
    @acessosan 3 ปีที่แล้ว +3

    I would like to understand how do I compare two fields in the document. Has anyone ever needed to do this type of comparison? I'm using the criteria.
    criteria.add(Criteria.where("this.campoC == this.campoD"));
    Query query = new Query();
    List criteria = new ArrayList();
    criteria.add(Criteria.where("campoA").is(123));
    criteria.add(Criteria.where("campoB").is("N"));
    criteria.add(Criteria.where("this.campoC == this.campoD")); //

    • @18potboy
      @18potboy 2 ปีที่แล้ว

      @GetMapping("/")
      List compareName(@PathVariable(value = "name") String name,@PathVariable(value = "name2") String name2){
      Query query = new Query();
      query.addCriteria(Criteria.where(name).elemMatch(Criteria.where(name)));
      return mongoTemplate.find(query,EmployeeModel.class);
      }

  • @swasb123
    @swasb123 2 ปีที่แล้ว +2

    Please share the sample code for this tutorial.

  • @akshaychothe7391
    @akshaychothe7391 2 ปีที่แล้ว +2

    Increase your volume please

  • @viratsuresh5946
    @viratsuresh5946 2 ปีที่แล้ว

    How to write case insensitive query

  • @rual284
    @rual284 2 ปีที่แล้ว

    Haven't seen any criteria queries...

  • @laurencefinny7410
    @laurencefinny7410 3 ปีที่แล้ว +1

    explain update query

  • @siddapure
    @siddapure 4 หลายเดือนก่อน

    where is github link?

  • @madantengale5574
    @madantengale5574 2 ปีที่แล้ว

    Can you please add this code into GitHub

  • @shantanuverma331
    @shantanuverma331 9 หลายเดือนก่อน

    Can we use @Query for update also ??

    • @technotowntechie9732
      @technotowntechie9732  9 หลายเดือนก่อน +1

      In Spring Data JPA, the @Query annotation is typically used for defining custom queries for reading data from the database. While it's not intended for update operations, you can achieve update functionality using @Query in combination with the @Modifying annotation.