Skip to main content



      Home
Home » Eclipse Projects » EclipseLink » Typed query hints
Typed query hints [message #1090993] Tue, 20 August 2013 19:27 Go to next message
Eclipse UserFriend
I'm loving CriteriaBuilders and the Entity metadata for strongly typed queries...

Anyway, is there any way to use the same strong typing for specifying query hints?

For example, I want to add a batch read hint using a Typed field, so instead of:

               final TypedQuery<TechnicalPublicationType> readAllQuery = ydsusEntityManager.createQuery("select o from TechnicalPublicationType o", TechnicalPublicationType.class);
                readAllQuery.setHint("eclipselink.batch", "o.categories");


I want to do something like:

                final CriteriaBuilder builder = ydsusEntityManager.getCriteriaBuilder();
                final CriteriaQuery<TechnicalPublicationType> query = builder.createQuery(TechnicalPublicationType.class);
                final Root<TechnicalPublicationType> from = query.from(TechnicalPublicationType.class);
                final TypedQuery<TechnicalPublicationType> readAllQuery = ydsusEntityManager.createQuery(query);
                readAllQuery.setHint("eclipselink.batch", from.get(TechnicalPublicationType_.categories));
Re: Typed query hints [message #1096573 is a reply to message #1090993] Wed, 28 August 2013 11:29 Go to previous messageGo to next message
Eclipse UserFriend
No, hints only use string.
Re: Typed query hints [message #1106198 is a reply to message #1096573] Tue, 10 September 2013 16:39 Go to previous message
Eclipse UserFriend
Feature request Smile

I guess this would be the JPA standards committee!
Previous Topic:Composite Primary key error - Multiple writable mappings exist for the field
Next Topic:JPA hierarchical queries
Goto Forum:
  


Current Time: Wed Jul 23 09:30:05 EDT 2025

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

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

Back to the top