Skip to content

Commit

Permalink
fix: @Modifying 제거(#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
whereami2048 committed May 21, 2024
1 parent 544058f commit f63d98e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import java.util.List;
import java.util.UUID;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

Expand All @@ -16,7 +15,6 @@ public interface ExperienceJpaRepository extends JpaRepository<ExperienceJpaEnti
List<ExperienceJpaEntity> findByChildTagIdAndCreatedAtBetweenOrderByCreatedAtDesc(UUID childTagId, LocalDateTime startYear, LocalDateTime endYear);
List<ExperienceJpaEntity> findByTitleContaining(String title);

@Modifying
@Query("select e from ExperienceJpaEntity e where e.experienceId in :experienceIds")
List<ExperienceJpaEntity> findByIds(@Param("experienceIds") List<UUID> experienceIds);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

import com.bamyanggang.domainmodule.domain.jobDescription.enums.WriteStatus;
import com.bamyanggang.persistence.jobDescription.jpa.entity.JobDescriptionJpaEntity;
import java.time.LocalDateTime;
import java.util.UUID;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

Expand All @@ -16,7 +14,6 @@ public interface JobDescriptionJpaRepository extends JpaRepository<JobDescriptio
@Query("SELECT j FROM JobDescriptionJpaEntity j WHERE j.userId = :userId AND (:writeStatus is null or j.writeStatus = :writeStatus)")
Page<JobDescriptionJpaEntity> findAllByUserIdAndWriteStatus(@Param("userId") UUID userId, @Param("writeStatus") WriteStatus writeStatus, @Param("date") Pageable pageable);

@Modifying
@Query("UPDATE JobDescriptionJpaEntity j SET j.writeStatus = 'CLOSED' WHERE j.endedAt < CURRENT_TIMESTAMP")
void changeWriteStatus();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
import java.util.List;
import java.util.UUID;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public interface StrongPointJpaRepository extends JpaRepository<StrongPointJpaEntity, UUID> {
List<StrongPointJpaEntity> findAllByUserId(UUID userId);

@Modifying
@Query("select spe from StrongPointJpaEntity spe where spe.strongPointId in :strongPoints")
List<StrongPointJpaEntity> findByIds(@Param("strongPoints") List<UUID> strongPointIds);

Expand Down

0 comments on commit f63d98e

Please sign in to comment.