source: src/main/java/com/example/skychasemk/repository/DestinationRepository.java

Last change on this file was 57e58a3, checked in by ste08 <sjovanoska@…>, 4 months ago

Initial commit

  • Property mode set to 100644
File size: 510 bytes
Line 
1package com.example.skychasemk.repository;
2
3import com.example.skychasemk.model.Destination;
4import org.springframework.data.jpa.repository.JpaRepository;
5import org.springframework.data.jpa.repository.Query;
6
7import java.util.List;
8
9public interface DestinationRepository extends JpaRepository<Destination, Integer> {
10 @Query("SELECT d.name FROM Destination d")
11 List<String> findAllCities();
12 //@Query("SELECT d.destinationID FROM Destination d")
13 Destination findByName(String departureCity);
14}
Note: See TracBrowser for help on using the repository browser.