|
|
From: gutzeit <gutz...@gmail.com>
Date: Fri, 4 Feb 2011 23:50:21 -0800 (PST)
Local: Sat, Feb 5 2011 2:50 am
Subject: Querying for an element of an embedded array
I have an Entity with a List of @Embedded objects. @Entity class SomethingEmbedded How can I query to get an element in the embedded array by, lets say id Is it possible with Morphia/Mongo ? Thanks in advance for your help. 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.
| ||||||||||||||
From: Scott Hernandez <scotthernan...@gmail.com>
Date: Sat, 5 Feb 2011 00:12:42 -0800
Local: Sat, Feb 5 2011 3:12 am
Subject: Re: [morphia] Querying for an element of an embedded array
It is not possible with mongo. When it is, morphia can add support for it.
You may want to follow these issues: 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.
| ||||||||||||||
From: gutzeit <gutz...@gmail.com>
Date: Sat, 5 Feb 2011 03:45:18 -0800 (PST)
Local: Sat, Feb 5 2011 6:45 am
Subject: Re: [morphia] Querying for an element of an embedded array
In you opinion is this something I should take into account when designing Thanks in 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.
| ||||||||||||||
From: gutzeit <gutz...@gmail.com>
Date: Sat, 5 Feb 2011 04:16:54 -0800 (PST)
Local: Sat, Feb 5 2011 7:16 am
Subject: Re: [morphia] Querying for an element of an embedded array
As an alternative is there a way to return the parent object with the 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.
| ||||||||||||||
From: Scott Hernandez <scotthernan...@gmail.com>
Date: Sat, 5 Feb 2011 07:51:05 -0800
Local: Sat, Feb 5 2011 10:51 am
Subject: Re: [morphia] Querying for an element of an embedded array
That is exactly what the first issue describes in the list. There are
many limitations using embedded arrays (and deeply nested objects) which you may want to consider. Storing constantly growing entities can have a large performance 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.
| ||||||||||||||
|
|
From: Brian KimJohnson <briankimjohn...@gmail.com>
Date: Sat, 5 Feb 2011 21:45:59 -0800 (PST)
Local: Sun, Feb 6 2011 12:45 am
Subject: $elemMatch Query questions
Greetings all,
Using Morphia on a project and it has been great thus far so thanks
I am having trouble making this query in Morphia. Can some tell me
db.BaseActivity.find(
})
Notice that for this query I am specifying an array of embedded object
"rs". In order to select an object from the array I am searching for an id and making sure that the array "l" does not contain 127. Can this query be done using Morphia? I know how to generate it with
*Sample query for only one attribute:
Thanks! 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.
| ||||||||||||||
From: Scott Hernandez <scotthernan...@gmail.com>
Date: Sat, 5 Feb 2011 23:04:31 -0800
Local: Sun, Feb 6 2011 2:04 am
Subject: Re: [morphia] $elemMatch Query questions
On Sat, Feb 5, 2011 at 9:45 PM, Brian KimJohnson
There is not an easy way to express that query with the query interface. You will need to create a DBObject for the filter. updateQuery.filter("rs elem", BasicDBObjectBuilder.start("_id", (it is something like that; I haven't tested that.) 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.
| ||||||||||||||
From: Brian KimJohnson <briankimjohn...@gmail.com>
Date: Mon, 7 Feb 2011 12:37:50 -0800 (PST)
Local: Mon, Feb 7 2011 3:37 pm
Subject: Re: $elemMatch Query questions
That worked perfectly. Thanks Scott!
On Feb 6, 2:04 am, Scott Hernandez <scotthernan...@gmail.com> wrote:
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.
| ||||||||||||||
|
|
From: gutzeit <gutz...@gmail.com>
Date: Sun, 6 Feb 2011 13:32:02 -0800 (PST)
Local: Sun, Feb 6 2011 4:32 pm
Subject: Query By Example
Is there a way to execute query by example using Morphia? Something like: User exampleUser = new User("em...@ddd.com"); 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.
| ||||||||||||||
From: Scott Hernandez <scotthernan...@gmail.com>
Date: Sun, 6 Feb 2011 14:20:15 -0800
Local: Sun, Feb 6 2011 5:20 pm
Subject: Re: [morphia] Query By Example
No, but I can add it to the list. You can do this with embedded
objects, just not the root entity. I'm thinking something like: ds.QBE(exampleUser).get/asList() Is QBE a good method name, or maybe "queryByExample"? 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.
| ||||||||||||||
| Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy |
| ©2013 Google |