rzo1 opened a new pull request, #156:
URL: https://github.com/apache/openjpa/pull/156
Implements the three mandatory JPA 3.2 methods that were still throwing
`UnsupportedOperationException("Not yet implemented (JPA 3.2)")`, one commit
each with tests: `EntityManager.createQuery(TypedQueryReference)`,
`EntityManagerFactory.getNamedQueries(Class)` and
`EntityManager.find(EntityGraph, Object, FindOption...)`.
`createQuery(TypedQueryReference)` delegates to `createNamedQuery(name,
resultType)` and applies the reference's hints. `getNamedQueries(Class)` needed
metadata support first, so `AnnotationPersistenceMetaDataParser` now honours
the JPA 3.2 `@NamedQuery.resultClass()` the same way it already honoured
`@NamedNativeQuery.resultClass()`; the method then returns a fresh map of
`TypedQueryReference` for every named query whose declared result type is
assignable to the requested one. `find(EntityGraph, ...)` resolves the root
type from the graph and applies it as a **load graph** to the pushed fetch plan
(with a cycle guard), which is the first place an `EntityGraph` actually
influences loading in OpenJPA — until now `EntityGraphImpl` was a pure data
holder.
Two known gaps worth a reviewer's opinion: named queries without a declared
result type are excluded from `getNamedQueries` for every requested type
including `Object.class`, and because the bundled `orm_3_2.xsd.rsrc` still
carries the 3.1-shaped `named-query` type without `result-class`, XML-declared
named queries can never be returned — that stale schema looks like a separate
follow-up.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]