Skip to content

Commit

Permalink
generatedValue 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
HwiYul-G committed May 9, 2024
1 parent 02d5c76 commit 31509eb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/y/java_board/domain/Article.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@Entity
public class Article {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String title;
private String content;
Expand Down
7 changes: 2 additions & 5 deletions src/main/java/com/y/java_board/domain/Comment.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package com.y.java_board.domain;

import com.y.java_board.dto.CommentDto;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;

Expand All @@ -15,7 +12,7 @@
@Entity
public class Comment {
@Id
@GeneratedValue
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String writer;
private String content;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/y/java_board/domain/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
@Builder
public class User {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

@Column(nullable = false, unique = true, length = 45)
private String email;
private String password;
private String name;
private String nickname;
@Lob
@Lob @Column(name = "profile_image")
private byte[] profileImage;

public User(String email, String password, String name, String nickname) {
Expand Down

0 comments on commit 31509eb

Please sign in to comment.