• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Azrael Noor
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:


or


 

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?
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question was cross-posted on StackOverflow and on Quora.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic