• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

How to access Sort Field name of Foreign Key in an entity using Hibernate Lucene Search?

Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are two entities and first entity is referred into second entity.

Entity 1:

Entity 2:

There is no annotation in Entity 2 on reference Yesh; Entity 1 have field annotated with name "YeshName_for_sort". But when i try to access above field as given in following example:

Main Class:

Sorting does not work. I also tried to change statements like:



but it is not working.

What annotations need to be implemented in entities or any changes in main program to access the field for sorting?
Posts: 11604
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question was cross-posted on StackOverflow and on Quora.
Squanch that. And squanch this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic