SQL ntranslated benim HQL geçerli:Parantez İşte
delete from `email` where `status`=? and `creation_time`<=? or `status`=? and `attempts`>=?
Soru: Neden parantez SQL olmayan
İşteQuery query = createQueryOnCurrentSession("DELETE Email e " +
"where " +
"(status = :sent and creationTime <= :creation)" +
"or " +
"(status = :error and maxEttempts >= :maxEttempts)");
oluşturulan SQL nedir?
delete from `email` where (`status`=? and `creation_time`<=?) or (`status`=? and `attempts`>=?)
Ben 2 istekleri silecektir olarak alternatif olabilir: Olmasını beklediğiniz?
delete from `email` where `status`=? and `creation_time`<=?
delete from `email` where `status`=? and `attempts`>=?
şöyle parantez kaçan deneyin bağlantıyı takip edin: "' \ (' –
tek' \ ("' (tabii ki) derleme ve çifte "\\ (" 'throw exception:' org.hibernate.QueryException: beklenmedik char: '\' [DELETE com.grroo.model.Email e nerede \ (status =: gönderilen ve yaratmaZaman <=: oluşturma \) veya \ (durum =: hata ve girişimler> =: maxAttempts \)] – urir
Sanırım siz Sorgu dizgeni durumunuza ekleyebilir ve daha sonra –