Skip to content

Commit

Permalink
투데이 테이블 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
duhwan05 committed Aug 30, 2024
1 parent 3703e48 commit 1e13ef8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/example/healthylife/entity/HeartEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ public class HeartEntity implements Serializable {
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long heartSq;

@ManyToOne
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "user_sq", nullable = false)
private UserEntity user;

@ManyToOne
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "today_sq", nullable = false)
private TodayEntity today;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import java.util.Optional;

public interface HeartRepository extends JpaRepository<HeartEntity, Long> {
Optional<HeartEntity> findByUserAndToday(UserEntity user, TodayEntity today);
boolean existsByUserAndToday(UserEntity user, TodayEntity today);
Optional<HeartEntity> findByUserAndToday(UserEntity user, TodayEntity today);

}
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;
import java.time.LocalDateTime;
import java.util.Optional;

@RequiredArgsConstructor
@Service
Expand Down

0 comments on commit 1e13ef8

Please sign in to comment.