Hi Ryan, thanks for the link but unfortunately my case is when the unique property must not be read only (users emails for example), and I`m still unable to find clean solution.
If you have any other ideas I`ll be glad to hear(read) them. Greetings, Ilian Iliev On 18 Септ, 09:30, ryan <ryanb+appeng...@google.com> wrote: > hi ilian! there are lots of hacks, but in short, if you need to do > this across entity groups, the only fully correct, safe way is with > key names. see the discussion > inhttp://code.google.com/p/googleappengine/issues/detail?id=178 > . > > On Sep 17, 12:30 am, "eng. Ilian Iliev" <anthonyl...@gmail.com> wrote: > > > HI all, > > > I`m pretty new with GAE and DataStore and still unable to find the way > > for > > creating some "simple" tasks I`m used to. > > > The problem is that I want create list of users that can log into my > > application. > > The model and code I`m currently using is listed bellow: > > class AdminUsers(db.Model): > > user_obj = db.UserProperty() > > active = db.BooleanProperty(False) > > > But I can not find the way to ensure users uniqueness. > > > user_in_db =AdminUsers.all().filter('user_obj =', user).fetch(1) > > if not user_in_db: > > user_entry = AdminUsers(user_obj = > > users.get_current_user()) > > user_entry.put() > > > Any ideas will be appreciated. > > > Thanks in advance, > > Ilian Iliev > > --~--~---------~--~----~------------~-------~--~----~ 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 google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---