Skip to content
Snippets Groups Projects
Commit 7d891a9f authored by Michal Badin's avatar Michal Badin
Browse files

refactoring(CarRepository): Added alias

parent 21792f20
No related branches found
No related tags found
2 merge requests!54Merge develop into main,!45M2 feedback - string size restriction, CI/CD and DomainObject
......@@ -10,6 +10,6 @@ import java.util.Optional;
@Repository
public interface CarRepository extends JpaRepository<Car, Long> {
@Query("SELECT c FROM Car c LEFT JOIN FETCH c.components LEFT JOIN FETCH c.driver WHERE c.id = :id")
@Query("SELECT c FROM Car c LEFT JOIN FETCH c.components cc LEFT JOIN FETCH c.driver d WHERE c.id = :id")
Optional<Car> findById(@Param("id") Long id);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment