-
Notifications
You must be signed in to change notification settings - Fork 0
Cart 필드 카멜케이스로 변경 #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The head ref may contain hidden characters: "20251107_#17_cart_Domain_crud\uAE30\uB2A5\uCD94\uAC00"
Conversation
개요Cart 엔티티의 필드 이름을 변경 사항
예상 코드 리뷰 노력🎯 2 (Simple) | ⏱️ ~10분 관련 가능성 있는 PR
시
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
| @GeneratedValue(strategy = GenerationType.IDENTITY) | ||
| @Column(name = "cart_id") | ||
| private Long cart_id; | ||
| private Long cartId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Test 1: Check for getCart_id() usage
echo "=== Searching for getCart_id() usage ==="
rg -i "getCart_id\s*\(" --type java -C 2 || echo "No matches found for getCart_id()"
# Test 2: Check for setCart_id() usage
echo -e "\n=== Searching for setCart_id() usage ==="
rg -i "setCart_id\s*\(" --type java -C 2 || echo "No matches found for setCart_id()"
# Test 3: Check for other snake_case private fields in cart domain
echo -e "\n=== Checking for other snake_case fields in cart domain ==="
fd -e java . src/main/java/com/campustable/be/domain/cart --exec rg -n 'private\s+\w+\s+\w+_\w+' {} + || echo "No snake_case fields found"
# Test 4: Check if Cart.java file exists and show its current state
echo -e "\n=== Current Cart.java field names ==="
cat src/main/java/com/campustable/be/domain/cart/entity/Cart.java 2>/dev/null | head -50 || echo "File not found or unable to read"Repository: CampusTable/campus-table-be
Length of output: 2763
모든 사용처를 getCartId()로 업데이트하지 않았습니다. CartService.java에서 수정이 필요합니다.
필드명을 cart_id에서 cartId로 변경하여 자바 네이밍 컨벤션을 따르도록 한 것은 적절합니다. @Column(name = "cart_id") 어노테이션이 유지되어 데이터베이스 스키마에는 영향이 없습니다.
다만, Lombok이 생성하는 getter 메서드명이 getCart_id()에서 getCartId()로 변경되었으므로, CartService.java에서 여전히 사용 중인 다음 두 줄을 수정해야 합니다:
cart.getCart_id()→cart.getCartId()cart.get().getCart_id()→cart.get().getCartId()
🤖 Prompt for AI Agents
In src/main/java/com/campustable/be/domain/cart/service/CartService.java (update
the few occurrences where cart.getCart_id() is used), the code still calls the
old Lombok-generated getter name getCart_id(); change all occurrences to the new
camelCase getter getCartId() — specifically replace cart.getCart_id() with
cart.getCartId() and cart.get().getCart_id() with cart.get().getCartId(); ensure
imports/compilation unaffected and run tests.
✨ 변경 사항
✅ 테스트
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.