Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Passing Collection List to In clause in nativeQuery - EclipseLink(Could not pass List to in clause)
Passing Collection List to In clause in nativeQuery - EclipseLink [message #1810138] Thu, 01 August 2019 08:35
Adem KÖSE is currently offline Adem KÖSEFriend
Messages: 1
Registered: August 2019
Junior Member
Hi All,
I use Spring Framework and H2 DB. I need to use EclipseLink instead of Hibernate.
I have a query as below. This query can execute on Hibernate but not in EclipseLink.
I searched that passing collection is not supported in NativeQuery.
Jpql does not support WITH RECURSIVE clause and does not see any not entity table in queries also.
How can I execute this query?
Thanks.
@Query(nativeQuery = true, value = "select * from app where id in ( "
			+ " WITH RECURSIVE T(N) AS ( " +
				"select member from members  where member = ?1 " +
					"UNION ALL " +
				"SELECT user FROM members  ,T where member = N " +
				") " +
				"select USERAPPS.appid from T inner join USERAPPS on T.N=USERAPPS.userid " +
					"UNION " +
				"select USERAPPS.appid from  USERAPPS where USERAPPS.userid = ?1 " +
					"UNION " +
				"select USERAPPS.appid from USERAPPS where USERAPPS.userid in ( select id from USER where USER.OEM_ID in (select ID from OEM where name in ?2) ) )")
	Page<App> findUsersApps(String userId, List<String> oemList, Pageable pageable);
Previous Topic:EclipseLink PreUpdate on OneToOne Relationship not persisted
Next Topic:Optimization batch reading collection after invalidation
Goto Forum:
  


Current Time: Tue Oct 15 22:22:16 GMT 2024

Powered by FUDForum. Page generated in 0.03540 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top