Skip to content

Mybatis update query시 파라미터 오류 #2

Description

@pinest94

mybatis update시 파라미터 오류

MyBatis Mapper interface에서 파라미터가 여러개인 경우

void updateProduct(Product product, Long id);
--> void updateProduct(@PARAM("product") Product product, @PARAM("id")Long id);
@PARAM 어노테이션을 사용해야한다.

Mapper.xml에서는 name = #{product.name}와 같이 @PARAM안에 "product"를 사용하여 value값을 추출한다.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions