}
@AssertTrue(message="profile name is already being used by another profile")
public boolean isUniqueLoginNameConstraint() {
IProfileDAO dao = Registry.getProfileDAO();
if (isNewObject()) {
return !dao.existsByProfileNameAnotherTransaction(profileName);
} else {
try {
Profile p = dao.findByProfileNameAnotherTransaction(profileName);
return p.getId().equals(getId());
} catch (InstanceNotFoundException e) {
return true;
}