Rick,

Here is the OpenBD code:

MongoCollectionFind(
                        DATASOURCENAME,
                        'arrayTest',
                        {'chapter.chapterid' : 1 },
                        {'chapter' : { $elemMatch : { 'chapterid' : 1 } } }
                    );





Rick <mailto:[email protected]>
08 October 2013 15:44
Matthew,

Thank you - That's absolutely the result I am supposed to get back according to the mongodb documentation but I am unable to through openbd. I see that you didn't run it through openbd though based on the code for your query.
--
--
online documentation: http://openbd.org/manual/
http://groups.google.com/group/openbd?hl=en

---
You received this message because you are subscribed to the Google Groups "Open BlueDragon" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
Rick <mailto:[email protected]>
07 October 2013 04:07
I'm using the latest mongodb and openbd.

However, while I can query and get back the entire BOOK data, I cannot seem to limit the query to only get back 1 chapter at a time. I am absolute that mongodb supports it but when I try the examples from the mongodb site to access the array to only return a chapter, it will not return it alone. I've gone through all of the ways that mongodb's docs says that the array can be accessed.

I've tried to see if there was a new mongodb jar available to update openbd and I see that the latest openbd is using the latest mongodb jar.

Stuck!

---------------------------------------------------------------------------------------------
*chapters* = [
{chapterid = 1, title = "Chap A", sections = []},
{chapterid = 2, title = "Chap B", sections = []},
{chapterid = 3, title = "Chap C", sections = [
{chapterid = 4, title = "Chap C1"},
{chapterid = 5, title = "Chap C2"}
]}
];

book = {
        title = "My Book",
        author = "Cool Author",
        chapters = *chapters*
 };
---------------------------------------------------------------------------------------------


--
--
online documentation: http://openbd.org/manual/
http://groups.google.com/group/openbd?hl=en

---
You received this message because you are subscribed to the Google Groups "Open BlueDragon" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

--
--
online documentation: http://openbd.org/manual/
http://groups.google.com/group/openbd?hl=en

--- You received this message because you are subscribed to the Google Groups "Open BlueDragon" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to