tag:blogger.com,1999:blog-1608705335066798875.post2421276111126345476..comments2024-03-28T10:35:56.987+01:00Comments on IoC : Ulises Fasoli's blog: MongoDB spring data $elemMatch in field projectionUlises Fasolihttp://www.blogger.com/profile/18263942972377086645noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-1608705335066798875.post-46062132519496886632017-03-02T04:03:26.314+01:002017-03-02T04:03:26.314+01:00findBookNumberInSaga has a parameter that is unuse...findBookNumberInSaga has a parameter that is unused. The same function uses a title variable that doesn't exist.McHammerhttps://www.blogger.com/profile/02122700745669799471noreply@blogger.comtag:blogger.com,1999:blog-1608705335066798875.post-13355318937086381232016-09-09T00:49:25.495+02:002016-09-09T00:49:25.495+02:00Thank you. It worked for me!!!Thank you. It worked for me!!!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1608705335066798875.post-2661722041451349012013-12-05T08:54:21.196+01:002013-12-05T08:54:21.196+01:00Hi,
What version of Spring Data are you using?.
In...Hi,<br />What version of Spring Data are you using?.<br />In order to do Aggregation operations such as $unwind you need to use Spring Data 1.3+ which added support for Mongo's Aggregation framework ( see here http://docs.spring.io/spring-data/data-mongodb/docs/current/reference/htmlsingle/#mongo.aggregation).<br /><br />Basically you do a static import of the package org.springframework.data.mongodb.core.aggregation.Aggregation.*; and play with the aggregation operators.<br /><br />UlisesUlises Fasolihttps://www.blogger.com/profile/18263942972377086645noreply@blogger.comtag:blogger.com,1999:blog-1608705335066798875.post-29691241045553909872013-12-04T22:18:47.254+01:002013-12-04T22:18:47.254+01:00Thanks for this it was very useful. I tried this b...Thanks for this it was very useful. I tried this but get only the _id of the object back with everything else null. Pretty sure i'm in line with your example. think i need to be able to unwind the array as i only want elements matching a value in the list. How can you $unwind with spring mongo? not seen anything indicating that it can be done. Thanks again.<br />TB. Anonymoushttps://www.blogger.com/profile/12209394634441303296noreply@blogger.com