source: source/MovieZilla-master/src/main/java/com/example/demo/repository/AuditoriumRepository.java@ fc7ec52

Last change on this file since fc7ec52 was fc7ec52, checked in by darkopopovski <darkopopovski39@…>, 21 months ago

all files

  • Property mode set to 100644
File size: 668 bytes
Line 
1package com.example.demo.repository;
2
3import com.example.demo.model.Auditorium;
4import org.springframework.data.jpa.repository.JpaRepository;
5import org.springframework.data.jpa.repository.Query;
6
7import java.util.List;
8
9public interface AuditoriumRepository extends JpaRepository<Auditorium, Integer> {
10
11 @Query(value="select * from auditorium as a\n" +
12 " join gives as g on g.auditorium_id = a.auditorium_id\n" +
13 " join movieprojection as m on m.projection_id = g.projection_id\n" +
14 " where m.projection_id=?",nativeQuery = true)
15 public List<Auditorium> SelectAuditoriumsByProjection(Integer projection_id);
16
17
18}
Note: See TracBrowser for help on using the repository browser.