开发者

get entity from query object by keyname

开发者 https://www.devze.com 2023-03-01 15:20 出处:网络
I have a query object of artist.tracks artist = db.ReferenceProperty(Artist,collection_name=\'tracks\')

I have a query object of artist.tracks

artist = db.ReferenceProperty(Artist,collection_name='tracks')

and I want to get the entity of the query object by its keyname so

artist.tracks = all tracks from artist

I want to get the tr开发者_开发问答ack from this query with keyname of 'thisKeyName'


If you know the key_name, you don't need a query use Model.get_by_key_name:

Kind.get_by_key_name('thisKeyName')
0

精彩评论

暂无评论...
验证码 换一张
取 消