google-app-engine


How can I filter self out of an Ancestor query on recursive entities


I have the following recursive struct:
type Category struct {
ParentKey *datastore.Key `datastore:"-"`
Name string
}
When I run an Ancestor query on those values, I get the parent in the results:
var categories []Category
q := datastore.NewQuery("Category").Ancestor(parentKey)
keys, err := q.GetAll(ctx, categories)
The entity associated with parentKey gets returned in the slice as well as all its children.
How can I prevent the Category associated to parentKey from being included in the results?

Related Links

App Engine: Can I upload my local dev_appserver.datastore to the live datastore?
App Engine URL mapping
Sitemaps structure for large App Engine site
cheetah in appengine
Help to Upload zip file containing CSV file in GAE
Google App Engine: Using datastore with users who are not logged in
Text to HTML converter for Google App Engine
Pagination and Multiple relational entity indexes with AppEngine
time taken to upload a picture of 1M ~ 5M from iPhone to either Google AE or Amazon S3
Sending email from dev server with --smtp_host=smtp.gmail.com
Google App Engine logout url
django-nonrel google app engine order_by('?')
Trouble while sending Email using Google App Engine to Verizon (vtext.com)
Keeping track of time with 1 second accuracy in Google App Engine
Developing for Google App Engine and using the datastore
GAE Datastore: “total” property vs. adding up line items?

Categories

HOME
prism
merge
ns-3
rsa
obfuscation
solaris
access
square
boto3
okhttp
categorical-data
windows-ce
ipmitool
3nf
symbol
job-scheduling
red5
vuejs
google-picker
identity-management
delphi-xe5
sar
simpleitk
guzzle
rubymotion
systemtime
easeljs
strongname
jboss6.x
mount
datastax-enterprise-graph
carrierwave
ntp
constexpr
boost-asio
panoramas
complex-numbers
utorrent
cognos-bi
instantiation
keras-layer
carriage-return
reason
alphabetical
password-protection
linq-to-objects
preloader
subclipse
reportservice2010
insight
shinobi
smartfoxserver
docpad
winusb
dimension
embedding
mediametadataretriever
upx
grass
qbxml
user-management
morton-number
video-player
sapscript
finalbuilder
pyobjc
google-refine
nsurlsessiondatatask
zend-currency
diff3
openbabel
android-cookiemanager
decoupling
windows-embedded-standard
jeromq
mongohq
beaker-testing
mvc-editor-templates
workitem
facebook-timeline
octal
composite-component
onload-event
robotlegs
midlet
adobe-media-server
thttpd
gobject-introspection
pinch
ikimagebrowserview
listactivity
lr
appliance

Resources

Encrypt Message