You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to register a new user with the same username or email as an
existing one currently throws an exception. It shouldn't.
I don't really know how to solve this. But I guess there are two ways:
1. Catch the exception and parse it for clues as to why something went
wrong. If it was due to a "Integrity Contstraint Violation", the username
or email wasn't unique.
More: http://java.sun.com/javase/7/docs/api/
2. Somehow do it as a transaction, first selecting any users with the same
username or email, and if the selection is empty, insert. But what if the
entire transaction fails, either due to someone else doing stuff, or
because of bad sql?
More: http://java.sun.com/docs/books/tutorial/jdbc/basics/transactions.html
Original issue reported on code.google.com by tgwizard on 9 Apr 2010 at 5:36
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
tgwizard
on 9 Apr 2010 at 5:36The text was updated successfully, but these errors were encountered: