import de.spring.example.persistence.domain.Ad;
import de.spring.example.persistence.domain.AdDescription;
+/**
+ * By default <code>org.springframework.data.jpa.repository.support.SimpleJpaRepository<code>
+ * will be the implementation for this interface.
+ *
+ * Be careful with <code>@Transactional</code>. SimpleJpaRepository has annotated methods.
+ *
+ */
public interface AdDescriptionRepository extends PagingAndSortingRepository<AdDescription, Long> {
// Custom Query method
import de.spring.example.persistence.domain.Ad;
+/**
+ * By default <code>org.springframework.data.jpa.repository.support.SimpleJpaRepository<code>
+ * will be the implementation for this interface.
+ *
+ * Be careful with <code>@Transactional</code>. SimpleJpaRepository has annotated methods.
+ *
+ */
public interface AdRepository extends PagingAndSortingRepository<Ad, Long> {
// Named Native Query (using the native language of the store) It is not portable.
}
// I do not have to do anything here because all I need is implemented by RepositoryBasedRestController :)
+
+ // @Transactional is implemented by org.springframework.data.jpa.repository.support.SimpleJpaRepository
+ // By default, SimpleJpaRepository will be automatically implemented by my
+ // Spring JPA repositories: AdRepository and AdDescriptionRepository.
}