mysql 구문 질문이 있습니다.

mysql 구문 질문이 있습니다.

QA

mysql 구문 질문이 있습니다.

답변 1

본문

제가 게시글 밑에 덧글 삭제 구문을 구현중인데,

그냥 덧글 소유주만 체크해서 삭제는 하겠는데 게시글 소유주와 같이 권한을 주려고 하는데 에러가 나서 질문을 드립니다. 게시글은 article table 이고 덧글은 comment 회원아이디를 member_id라고 주어졌을떄


<!-- 자신의 덧글인지 검사한다 -->

<select id="selectCommentCountByMemberId"parameterType="review.model.Comment"

resultType="int">

SELECT COUNT(c.id) FROM comment c, article a

WHERE c.id=#{c.id} AND (c.member_id=#{c.member_id} OR a.member_id=#{a.member_id} )

</select>


제가 알기론 eqiu join을 해서 두개의 테이블에서 삭제를 하는것 같은데, 


### Error querying database.  Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'c' in 'class review.model.Comment'

### Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'c' in 'class review.model.Comment'

이렇게 에러가 나고 있습니다. 테이블 구문? 인데 왜 property named에서 에러가 나는지를 잘 모르겠습니다.

이 질문에 댓글 쓰기 :

답변 1

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 125,873
© SIRSOFT
현재 페이지 제일 처음으로