["slug" being an entity attribute]
Spring Data offers an existsBy query method, which we can define in the PostRepository, as follows:
1
2
3
4
5
6
@Repository
public interface PostRepository
extends JpaRepository<Post, Long> {
boolean existsBySlug(String slug);
}
[another] option to emulate existence is using a CASE WHEN EXISTS native SQL query:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
@Repository
public interface PostRepository
extends JpaRepository<Post, Long> {
@Query(value = """
SELECT
CASE WHEN EXISTS (
SELECT 1
FROM post
WHERE slug = :slug
)
THEN 'true'
ELSE 'false'
END
""",
nativeQuery = true
)
boolean existsBySlugWithCase(@Param("slug") String slug);
}
Hello, I am currently searchin for a way to convert several Word documents into a single PDF file. The original Word documents are attachments to a One Order object in CRM 5.0, and I want to create an
K. Järvelin, and J. Kekäläinen. Proceedings of the 23rd Annual International ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR 2000), page 41--48. New York, NY, USA, ACM, (2000)
D. Swallow, M. Blythe, and P. Wright. EACE '05: Proceedings of the 2005 annual conference on European association of cognitive ergonomics, (September 2005)
M. Hernández, and S. Stolfo. SIGMOD '95: Proceedings of the 1995 ACM SIGMOD international conference on Management of data, page 127--138. New York, NY, USA, ACM, (1995)
M. Al-Sammarraie, F. Siewe, and H. Zedan. CASEMANS '10: Proceedings of the 4th ACM International Workshop on Context-Awareness for Self-Managing Systems, page 11--19. ACM, (2010)
M. van Assem, V. Malaisé, A. Miles, and G. Schreiber. Proceedings of the Third European Semantic Web Conference (ESWC'06), volume 4011 of Lecture Notes in Computer Science, page 95--109. Budva and Montenegro, Springer-Verlag, (June 2006)
M. Buchenau, and J. Suri. Designing Interactive Systems - Proceedings of the 3rd conference on Designing interactive systems: processes, practices, methods, and techniques, page 424-433. New York, ACM Press, (2000)
M. Kapur, J. Voiklis, and C. Kinzer. Computer-supported collaborative learning 2005: The next 10 years!, page 252-261. Mahwah, NJ, Lawrence Erlbaum, (2005)