ReferenceProperty vs Integer property

10 views
Skip to first unread message

Joops

unread,
Jul 4, 2011, 6:28:02 AM7/4/11
to Google App Engine
Hi all,

I just wanted to check if there is any down side to using an Integer
property instead of a reference property to model a relationship. (I
don't need the autogenerated collection property)

Thanks very much

J.

Ernesto Oltra

unread,
Jul 4, 2011, 11:55:26 AM7/4/11
to google-a...@googlegroups.com
I'm already doing that. The only downside is ReferenceProperty stores the complete key path (app_id + parent + model + key_id + ...), while you will be storing only a part(key_id). If ancestor queries are not a problem for your app OR you can do them without needing the complete original key then you can simply use an Integer property.
Reply all
Reply to author
Forward
0 new messages