Is it possible to make access to indexed elements in JPQL, for example, in HQL :
select o from Order o where o.items[0].id = 1234
I could not find something related in JPA 2 specifications,
I am targeting the EclipseLink JPA here, so if you come up with an EclipseLink solution, that's fine, although a standard JPQL solution is preferred.
The INDEX function should do the trick (I actually tested it):
SELECT o FROM Order o JOIN o.items i WHERE i.id = 1234 AND INDEX(i) = 0
From the JPA 2.0 specification ( 4.6.17.2.2 Arithmetic functions ):
INDEX , . INDEX , , .
@Pascal Thivent . INDEX(), @OrderedColumn .
INDEX()
@OrderedColumn
, Hibernate, INDEX() , , @OrderedColumn mappedBy : JPA 2.0 @OrderColumn Hibernate 3.5
mappedBy
Source: https://habr.com/ru/post/1747438/More articles:Sessional attacks, what are the new breeds of attacks? - securityjQuery plugin check hide / show error container - jqueryCan I open a cluster MQ queue for writing in Perl? - perlTrying to find a good javascript function for hmac-sha1 - htmlПользовательская страница 404 не найдена в iis 7 для Classic ASP - iis-7exit from the click handler - javascriptadd padding to stylesheet of disabled QPushbutton animation - qtIs there a way to convert code to string and vice versa in Python? - macroshttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1747443/push-alerts-to-notification-tray-app-in-java&usg=ALkJrhgBCq0qu1jGwlWqOGiNkKVkwXiqmQHow to set global hook for WH_CALLWNDPROCRET? - c ++All Articles