Hi Thomas, If you want to avoid duplicates, the hash solution is great. Generate the hash, then In a transaction try to fetch the entity by id. If you can't get it, insert it.
Robert On Tue, Sep 6, 2011 at 21:16, Thomas Wiradikusuma <[email protected]> wrote: > Hi guys, > > I'm working on something like AirBnB but much simpler. I want to hint > user whenever he/she tries to submit duplicate entry. > > Currently, my model looks like: > > House { > Id > Username > Address > State > Country > } > > The id is made of address+state+country MD5. Is this the "correct" way > to do it? Or, should I go with auto-generated Id and add extra field > named 'hash', or how? > > > > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
