I've seen examples with similar question. But, please allow me to ask more specific questions that I want to confirm my understanding.
My questions:
For ListProperty of db.Key, if I can anticipate the maximum number of keys I want to store, how many should I NOT exceed for storing in ListProperty of db.Key as compared to ReferencedProperty ? [General Question] because it wasn't very clear where App Engine page says this,
Another more important one is that you want to avoid storing overly large lists of keys in a ListProperty
Let's say, there are users who can follow restaurant's activity feeds. Hence, User can add as many restaurants as they want to their favourite list. There are User model and Restaurant model. So, I believe any user would not follow more than 30 restaurants ? which makes it the ListProperty of db.Key as the ideal solution?
The considerations here are somewhat fuzzy -- there is no hard limit, except that the total (encoded) entity must not be larger than 1 MB. 30 keys is totally fine. 100 would still be fine. At 500-1000 I'd start worrying. At 10,000 you'll probably exceed the 1 MB limit.
Another consideration is that if you expect to add keys to the list one at a time (each time reading and writing the entity) you end up in O(N**2) land, which would make your updates start crawling really slowly, probably somewhere between 100 and 1000 keys.
These considerations are the same for all ListProperties -- keys are not special (the quote you gave just happens to come from an article that focuses on ListProperty(db.key)
).