like expressions are regular expressions when using mongodb. http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-RegularExpressions
/Patrik rsmith wrote: > > Came across another small difference related to criteria queries.. > > When using Hibernate/SQL, I had to build 'like' criteria as follows, with > '%' for wildcards: > > List<ConditionalCriteria> conditions = > ConditionalCriteriaBuilder.criteriaFor(A.class) > .withProperty(AProperties.someAttr()).like("%matchstring%") > .build(); > > When using MongoDB, I had to omit the '%': > > List<ConditionalCriteria> conditions = > ConditionalCriteriaBuilder.criteriaFor(A.class) > .withProperty(AProperties.someAttr()).like("matchstring") > .build(); > > I don't know if the % are supposed to be required or not. > > > -- View this message in context: http://old.nabble.com/MongoDB-cartridge-and-bidirectional-associations-tp29497347s17564p29506190.html Sent from the Fornax-Platform mailing list archive at Nabble.com. ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Fornax-developer mailing list Fornax-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fornax-developer