Giter VIP home page Giter VIP logo

spring-gift-jpa's Introduction

spring-gift-wishlist

step1

기능요구사항

지금까지 작성한 JdbcTemplate 기반 코드를 JPA로 리팩토링하고 실제 도메인 모델을 어떻게 구성하고 객체와 테이블을 어떻게 매핑해야 하는 지 알아본다
@DataJpaTest 사용하여 학습 테스트를 해 본다
아래 DDL을 참고하여 엔티티 클래스와 리포지토리 클래스를 작성해본다.

구현할 기능

앤티티 매핑
    - [x] product 
    - [x] member
    - [x] wish 
JPA repository로 수정
    - [x] productRepository
    - [x] memberRepository
    - [x] wishRepository 
JPA 테스트
    - [x] productRepositoryTest 
    - [x] memberRepositoryTest 
    - [x] wishRepositoryTest 

step2

기능요구사항

지금까지 작성한 JdbcTemplate 기반 코드를 JPA로 리팩터링하고 실제 도메인 모델을 어떻게 구성하고 객체와 테이블을 어떻게 매핑해야 하는지 알아본다.
객체의 참조와 테이블의 외래 키를 매핑해서 객체에서는 참조를 사용하고 테이블에서는 외래 키를 사용할 수 있도록 한다.

구현할 기능

외래키 매핑
    - [x] Wish 도메인의 외래키 user_id, product_id를 객체 참조하는 방법으로 구현 

spring-gift-jpa's People

Contributors

donghyun5434 avatar wotjd243 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.