[google-appengine] Re: How to get root entities only?

2008-12-10 Thread Lakshmi

Yes :)

I think Entity Groups are optimized more for performance and less for
function. (Another example to reinforce this statement is the need to
pass in the parent_id in get_by_id or the underlying assertion that
the id's may not be unique outside of the entity group)

On Dec 9, 11:59 am, Andy Freeman <[EMAIL PROTECTED]> wrote:
> > I also discovered that a root node is one that is its own ancestor.
>
> too bad queries with ancestor('__key__') or with 'ANCESTOR is
> __key__' (or the bound equivalent) don't work.
>
> On Dec 6, 6:49 pm,Lakshmi<[EMAIL PROTECTED]> wrote:
>
> > Sorry I completely forgot about this thread.
>
> > I added a is_root property to my model to work around this problem.
>
> > I also discovered that a root node is one that is its own ancestor.
>
> > On Oct 27, 11:02 am, "Vincent L." <[EMAIL PROTECTED]> wrote:
>
> > > I have the same problem,  did you find an answer ?
>
> > > On 10 oct, 21:04,Lakshmi<[EMAIL PROTECTED]> wrote:
>
> > > > Hello,
>
> > > > If we take the following example:
>
> > > > Comment
> > > >   - post (reference to Post)
> > > >   - text
> > > >   - author
>
> > > > where comments that are responded to become parents of other comments,
> > > > how can I get only therootentities - comments that are not
> > > > responses?
>
> > > > Comment.gql("WHERE post=:post AND ANCESTOR IS None", post=)
> > > > does not work. I get a  "Invalid WHERE condition at symbol None"
> > > > error.
>
> > > > Thanks in advance
> > > >Lakshmi.- Hide quoted text -
>
> > - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: How to get root entities only?

2008-12-06 Thread Lakshmi

Sorry I completely forgot about this thread.

I added a is_root property to my model to work around this problem.

I also discovered that a root node is one that is its own ancestor.

On Oct 27, 11:02 am, "Vincent L." <[EMAIL PROTECTED]> wrote:
> I have the same problem,  did you find an answer ?
>
> On 10 oct, 21:04,Lakshmi<[EMAIL PROTECTED]> wrote:
>
> > Hello,
>
> > If we take the following example:
>
> > Comment
> >   - post (reference to Post)
> >   - text
> >   - author
>
> > where comments that are responded to become parents of other comments,
> > how can I get only therootentities - comments that are not
> > responses?
>
> > Comment.gql("WHERE post=:post AND ANCESTOR IS None", post=)
> > does not work. I get a  "Invalid WHERE condition at symbol None"
> > error.
>
> > Thanks in advance
> >Lakshmi.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] How to get root entities only?

2008-10-10 Thread Lakshmi

Hello,

If we take the following example:

Comment
  - post (reference to Post)
  - text
  - author

where comments that are responded to become parents of other comments,
how can I get only the root entities - comments that are not
responses?

Comment.gql("WHERE post=:post AND ANCESTOR IS None", post=)
does not work. I get a  "Invalid WHERE condition at symbol None"
error.


Thanks in advance
Lakshmi.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---