-->
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.  [ 1 post ] 
Author Message
 Post subject: A substring problem using 'from' keyword from postgres
PostPosted: Thu Apr 13, 2006 2:03 pm 
Senior
Senior

Joined: Sun Oct 26, 2003 5:05 am
Posts: 139
Hi everyone,

I'm having a problem where Hibernate inteprets the 'from' as another parameter and just adds the commas to separate them all with the given expression. Is there a way I can force Hibernate to use this literally in a query without dropping down to JDBC?

Code:
substring(shipment.cargoControlNumber.sequence from '[[:digit:]]*') <> ''


Hibernate makes it look like the following:

Code:
substring(shipments1_.sequence, from, '[[:digit:]]*')<>''


Also, if there is another way to achieve the same thing in postgres, I'm all ears. I just want to insure that the sequence contains only digits and not other characters.

Thanks!


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

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.