Merge branch '59-fix-scene-repository-2' into 'dev'
fix scene repository Closes #59 See merge request sa4-2020/the-sanmarinoes/backend!83
This commit is contained in:
commit
fc25177a69
1 changed files with 2 additions and 2 deletions
|
@ -14,9 +14,9 @@ public interface SceneRepository extends CrudRepository<Scene, Long> {
|
||||||
* @param username a User's username
|
* @param username a User's username
|
||||||
* @return an optional scene, empty if none found
|
* @return an optional scene, empty if none found
|
||||||
*/
|
*/
|
||||||
@Query("SELECT r FROM Room r JOIN r.user u WHERE r.id = ?1 AND u.username = ?2")
|
@Query("SELECT s FROM Scene s JOIN s.user u WHERE s.id = ?1 AND u.username = ?2")
|
||||||
Optional<Scene> findByIdAndUsername(Long id, String username);
|
Optional<Scene> findByIdAndUsername(Long id, String username);
|
||||||
|
|
||||||
@Query("SELECT r FROM Room r JOIN r.user u WHERE u.username = ?1")
|
@Query("SELECT s FROM Scene s JOIN s.user u WHERE u.username = ?1")
|
||||||
List<Scene> findByUsername(String username);
|
List<Scene> findByUsername(String username);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue