@@ -16,6 +16,6 @@ public interface AttachmentRepo extends JpaRepository<Attachment, Long>, JpaSpec
@Query(nativeQuery = true, value = "select ifnull(max(attachment.version + 1),1) " +
"from attachment " +
- "where del = true and patent_id = ?2 and attachment_name like ?1")
+ "where del = false and patent_id = ?2 and attachment_name like ?1")
int findVersion(String attachmentName, Long patentId);
}