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 | |
---|
1 | package com.example.skychasemk.repository;
|
---|
2 |
|
---|
3 | import com.example.skychasemk.model.Destination;
|
---|
4 | import org.springframework.data.jpa.repository.JpaRepository;
|
---|
5 | import org.springframework.data.jpa.repository.Query;
|
---|
6 |
|
---|
7 | import java.util.List;
|
---|
8 |
|
---|
9 | public 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.