package uk.ac.ebi.spot.goci.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
import uk.ac.ebi.spot.goci.model.Event;

/**
 * Created by emma on 06/05/16.
 *
 * @author emma
 *         <p>
 *         Repository accessing Evnet entity object
 */
@RepositoryRestResource
public interface EventRepository extends JpaRepository<Event, Long> {

}


package uk.ac.ebi.spot.goci.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
import uk.ac.ebi.spot.goci.model.Event;

import java.util.List;

/**
 * Created by emma on 06/05/16.
 *
 * @author emma
 *         <p>
 *         Repository accessing Event entity object
 */
@RepositoryRestResource
public interface EventRepository extends JpaRepository<Event, Long> {
    List<Event> findByUserId(Long id);
}


Add method to find by user id
Add method to find by user id
