Last change
on this file since 571e0df was 59329aa, checked in by Ema <ema_spirova@…>, 3 years ago |
adding photos
|
-
Property mode
set to
100644
|
File size:
621 bytes
|
Rev | Line | |
---|
[59329aa] | 1 | package finki.diplomska.tripplanner.repository.jpa;
|
---|
| 2 |
|
---|
| 3 | import finki.diplomska.tripplanner.models.Images;
|
---|
| 4 | import org.springframework.data.jpa.repository.JpaRepository;
|
---|
| 5 | import org.springframework.data.jpa.repository.Query;
|
---|
| 6 | import org.springframework.data.repository.query.Param;
|
---|
| 7 | import org.springframework.stereotype.Repository;
|
---|
| 8 |
|
---|
| 9 | import java.util.List;
|
---|
| 10 |
|
---|
| 11 | @Repository
|
---|
| 12 | public interface JpaImageRepository extends JpaRepository<Images, Long> {
|
---|
| 13 |
|
---|
| 14 | @Query(value = "SELECT * FROM images AS i WHERE i.id_location = :locationId", nativeQuery = true)
|
---|
| 15 | List<Images> getAllImagesForLocation(@Param("locationId") Long locationId);
|
---|
| 16 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.