Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

back for the front find by user on route version and followed #38

Merged
merged 2 commits into from
Jan 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

public interface RouteFollowedRepository extends CrudRepository<RouteFollowed, Long>, PagingAndSortingRepository<RouteFollowed, Long> {
List<RouteFollowed> findByIdContaining(@Param("long") Long id);
List<String> findByCreatedBy(@Param("creator") User creator);
List<User> findByFollows(@Param("follows") Route follows);
List<RouteFollowed> findByCreatedBy(@Param("creator") User creator);
List<RouteFollowed> findByFollows(@Param("follows") Route follows);
List<RouteFollowed> findByCreatedByAndFollows(@Param("creator") User creator, @Param("follows") Route follows);
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@

import cat.udl.eps.softarch.myroutes.domain.Route;
import cat.udl.eps.softarch.myroutes.domain.RouteVersion;
import cat.udl.eps.softarch.myroutes.domain.User;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;

import java.util.List;
@RepositoryRestResource
public interface RouteVersionRepository extends CrudRepository<RouteVersion, Long>, PagingAndSortingRepository<RouteVersion, Long> {
List<RouteVersion> findByversionOf(Route route);
}
List<RouteVersion> findByCreatedBy(@Param("creator") User creator);
}
Loading