All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ch.inftec.ju.testing.db.data.repo.PlayerRepo Maven / Gradle / Ivy

There is a newer version: 4.5.1-11
Show newest version
package ch.inftec.ju.testing.db.data.repo;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import ch.inftec.ju.testing.db.data.entity.Player;

/**
 * Spring data CrudRepository for the Player entity.
 * @author Martin
 *
 */
public interface PlayerRepo extends JpaRepository {
	/*
	 * EclipseLink has a problem when the query should be created dynamically. When
	 * we explicitly define the query, we don't have this problem.
	 * Hibernate seems to work in both cases.
	 */
	@Query("select p from Player p where p.lastName = ?1")
	Player getByLastName(String name);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy