licailing 5 gadi atpakaļ
vecāks
revīzija
1828b5c091

+ 1 - 1
src/main/java/com/izouma/uwip/repo/AttachmentRepo.java

@@ -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);
 }