package com.dowstats.data.repositories

import com.dowstats.data.entities.Race
import com.dowstats.data.entities.User
import org.springframework.data.jpa.repository.Query
import org.springframework.data.repository.*

interface RaceRepository : CrudRepository<Race, Long>{
    fun findById(id: String): Race?

    @Query("SELECT u.race FROM DowUnit u WHERE u.modId = :modId")
    fun findRacesByMod(modId: Long): List<Race>
}