I have a one to many relationship between users and tasks (one user has many tasks).
Sql:
SELECT G.accountability, G.title, G.interval, G.description, U.user_name
FROM user U
LEFT OUTER JOIN GOAL G on (G.USER_ID = U.USER_ID)
I insert my data in the database where there is a foreign key association in each task to the user id. Is it possible in JPA to essentially say:
Given the user ID here are all the tasks
Here is my simple repo
import com.habicus.core.model.Goal;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface GoalRepository extends JpaRepository<Goal, Long> {
}