aspose file tools*
The moose likes Object Relational Mapping and the fly likes Joining entities for a simple full text search Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Joining entities for a simple full text search" Watch "Joining entities for a simple full text search" New topic
Author

Joining entities for a simple full text search

Frank Müller
Greenhorn

Joined: Feb 04, 2009
Posts: 2
Hi!

I think I have a very short question (with an easy solution, I still hope). Maybe someone
of you can give a quick answer. It's hard too find a solution for that kind of problem with
google because I can't think of any useful keywords for such a problem.

I have the following 2 entities:



What I want is that I get a result List of MainObjects that either have fulltext in their description
or have the fulltext string in the descriptions in one or more of its uploads.

My problem is that I get no result at all from my current query...

This is my current Query:



I know how to set Parameters of a query, so that can't be the problem.


Thank you in advance.



Frank Mueller
Frank Müller
Greenhorn

Joined: Feb 04, 2009
Posts: 2
Frank Müller wrote:
This is my current Query:



never mind. I found the solution myself. I only had to add "select m" in front of my query, so it is now


and it worked. If you leave that away you get a cast error by Hibernate/JPA. On a simpler query without "join" my application worked without "select".

Frank Mueller
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Joining entities for a simple full text search