Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Regex : Spring data: Mongodb : Help required
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Mridul Mishra  
View profile  
 More options Nov 17 2012, 4:14 am
From: Mridul Mishra <mridul.mis...@gmail.com>
Date: Sat, 17 Nov 2012 01:14:45 -0800 (PST)
Local: Sat, Nov 17 2012 4:14 am
Subject: Regex : Spring data: Mongodb : Help required

I must be doing something really stupid and need help to realize that . I
am using a simple regex like below to find out all matching documents where
short name starts with passed name. Now somehow this does not work as no
rows are returned  though when i run the query on mongo db shell it returns
multiple rows.

results=mongoTemplate.find(Query.query(new Criteria("short_name").regex(
"/^" + name +".*/i")), MongoInstrument.class);

Any insights?

Thanksin advance


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.