@file:JvmName("UserRepository")

package backend.model.user

import org.springframework.data.jpa.repository.Query
import org.springframework.data.repository.CrudRepository
import org.springframework.data.repository.query.Param

interface UserRepository : CrudRepository<UserCore, Long> {
    fun findByEmail(email: String): User

    fun findByActivationToken(token: String): User

    @Query("select case when count(e) > 0 then true else false end from UserCore e where e.email = ?1")
    fun existsByEmail(email: String): Boolean

    @Query("from UserCore u where u.firstname like concat('%',:search,'%') or u.lastname like concat('%',:search,'%') or u.email like concat('%',:search,'%')")
    fun searchByString(@Param("search") search: String): List<UserCore>
}

@file:JvmName("UserRepository")

package backend.model.user

import org.springframework.data.jpa.repository.Query
import org.springframework.data.repository.CrudRepository
import org.springframework.data.repository.query.Param

interface UserRepository : CrudRepository<UserCore, Long> {
    fun findByEmail(email: String): User

    fun findByActivationToken(token: String): User

    @Query("select case when count(e) > 0 then true else false end from UserCore e where e.email = ?1")
    fun existsByEmail(email: String): Boolean

    @Query("from UserCore u where u.firstname like concat('%',:search,'%') or u.lastname like concat('%',:search,'%') or u.email like concat('%',:search,'%')")
    fun searchByString(@Param("search") search: String): List<UserCore>

    @Query("from Sponsor s")
    fun findAllSponsors(): Iterable<Sponsor>

}

Add method to find all sponsors
Add method to find all sponsors

BreakOutEvent/breakout-backend,BreakOutEvent/breakout-backend,BreakOutEvent/breakout-backend