-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 
Author Message
 Post subject: Intermedia Text - Oracle Text
PostPosted: Mon Jun 21, 2004 6:27 am 
Newbie

Joined: Mon Jun 21, 2004 6:18 am
Posts: 15
I need to execute a "intermedia text" ( or "oracle Text" ) search, how can I do it using Hibernate? is possible?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 21, 2004 6:32 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Maybe using session.reateSQLQuery() which allow you to query using native SQL

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 21, 2004 7:52 am 
Newbie

Joined: Mon Jun 21, 2004 6:18 am
Posts: 15
An example of a Intermedia Text Query is:

SELECT ID, COMMENT FROM EMP_RESUME
WHERE CONTAINS (COMMENT, '!SMYTHE') > 0 ;

so, it is not a SQL standard Query. Does CreateSQLQuery work with no standard SQL querys?

Thank you very much for your excellent help!!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 21, 2004 9:01 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
This should also work in HQL, like
select f from Forum f where contains(f.comment, '!SMYTHE') > 0


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 21, 2004 9:07 pm 
Newbie

Joined: Fri Sep 26, 2003 4:29 pm
Posts: 16
I've used Orace text succesfully two ways. Directly using HQL, as per the previous reply, and I also wrote my own extension of the AbstractCriterion class to use the Criteria query method.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 29, 2004 10:23 am 
Newbie

Joined: Mon Jun 21, 2004 6:18 am
Posts: 15
This is my SQL ( it works fine ):
[code]SELECT *
FROM bopa b
WHERE
b.nlegis = 7
AND contains(b.resum, 'Andaluc


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 29, 2004 10:28 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Check the generated SQL


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 01, 2004 3:26 am 
Newbie

Joined: Mon Jun 21, 2004 6:18 am
Posts: 15
Restarting the Oracle Server has been the solution to the problem. Now Hibernate seems to work perfectly.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.