[ 
https://issues.apache.org/jira/browse/OPENJPA-2985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18106346#comment-18106346
 ] 

ASF subversion and git services commented on OPENJPA-2985:
----------------------------------------------------------

Commit c83f543e4275b2620953f659c6f985e2b406ce9c in openjpa's branch 
refs/heads/OPENJPA-2985 from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=c83f543e4 ]

[OPENJPA-2985] Apply review suggestions from PR 156

- EntityManagerImpl.parseFindOptions(): flatten the null check into an
  early return instead of wrapping the whole loop in "if (options != null)".
- TypedQueryReferenceImpl: use Map.of() for the empty-hints branch.

Deviation: the non-empty branch keeps unmodifiableMap(new 
LinkedHashMap<>(hints))
instead of Map.copyOf(hints), because Map.copyOf randomizes iteration order per
JVM run while createQuery(TypedQueryReference) replays the hints in that order
and OpenJPA has aliased hint keys (openjpa.FetchPlan.LockTimeout /
jakarta.persistence.lock.timeout, likewise for QueryTimeout) where the last 
write
wins, and because Map.copyOf rejects null keys and values that this public
constructor has always tolerated. TestGetNamedQueries now pins the order.


> Mandatory JPA 3.2 methods throw UnsupportedOperationException
> -------------------------------------------------------------
>
>                 Key: OPENJPA-2985
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2985
>             Project: OpenJPA
>          Issue Type: Sub-task
>            Reporter: Maxim Solodovnik
>            Priority: Major
>
> Discussion thread: 
> https://github.com/apache/openjpa/pull/144#discussion_r3683005795
> **(low)** `getNamedQueries(Class)` still throws 
> UnsupportedOperationException, as do 
> `EntityManagerImpl.createQuery(TypedQueryReference)` 
> (EntityManagerImpl.java:2779) and `find(EntityGraph, Object, FindOption...)` 
> (EntityManagerImpl.java:2645). These are mandatory JPA 3.2 API - planned 
> before merge, or tracked in a follow-up JIRA? Worth referencing the issue in 
> the exception message.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to