Ignore:
Timestamp:
02/08/23 15:48:51 (22 months ago)
Author:
DenicaKj <dkorvezir@…>
Branches:
master
Children:
2c7a732
Parents:
90317ea
Message:

Projections

Location:
src/main/java/com/example/moviezone/repository
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/example/moviezone/repository/ProjectionIsPlayedInRoomRepository.java

    r90317ea r5867520  
    1010
    1111public interface ProjectionIsPlayedInRoomRepository extends JpaRepository<ProjectionIsPlayedInRoom, ProjectionIsPlayedInRoomId> {
    12     @Query("SELECT pir FROM ProjectionIsPlayedInRoom pir WHERE pir.id_projection = :id_projection")
     12    @Query("SELECT pir FROM ProjectionIsPlayedInRoom pir WHERE pir.idprojection = :id_projection")
    1313    List<ProjectionIsPlayedInRoom> findAllByProjectionId(@Param("id_projection") Integer id_projection);
    1414}
  • src/main/java/com/example/moviezone/repository/ProjectionRepository.java

    r90317ea r5867520  
    33import com.example.moviezone.model.Projection;
    44import org.springframework.data.jpa.repository.JpaRepository;
     5import org.springframework.data.jpa.repository.query.Procedure;
    56
     7import javax.transaction.Transactional;
    68import java.time.LocalDate;
    79import java.util.List;
    8 
     10@Transactional
    911public interface ProjectionRepository extends JpaRepository<Projection,Integer> {
    10     //    NOTE: CHANGE THIS WITH MATERIALIZED VIEW
    11     //List<Projection> findAllBydate_time_startBefore(LocalDate datum);
     12    @Procedure("project.getProjectionsForFilms")
     13    List<Projection> getProjectionsForFilms(int id);
    1214}
Note: See TracChangeset for help on using the changeset viewer.