Prevent duplicate entries in column using hibernate
<p>I am trying to make a login system for my app using web-service,hibernate and MySql.What I am trying to do is to make separate column for phone number and email id provided by the user.I want my system to work with both the options available,I mean my login system should work for email id and as well as phone no.If my user wants to login with phone number or email id,in both way it should work.But I don't know how to make both of them unique to prevent duplicate entries.If I am using primary key it is working only with one column.I want both of them to be unique for each user registration.</p>