-
Sep 23rd, 2011, 08:26 PM
#1
MongoDB and limits on number of items on an embedded array of documents
Hello,
I'm trying to see if it is possible to tell mongoDB to restrict the number of entries of an embedded attribute of array of documents. For example here is my layout:
public class Student {
public List<Course> courses;
}
public class Course {
public String name;
}
How can I tell mongoDB (via mongoTemplate or repositories) to retrieve up to 3 Student's courses ? This is mainly applicable for applications that have tons of documents in the embedded array attribute and only want some of them for performance reasons.
Thanks!
Carlos
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules