fix scene repository
This commit is contained in:
parent
6a90f478d1
commit
24804d2d82
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