Using @Transactional when making more than one DB calls within a method.
@Transactional
public void updateUserEntity(UserEntity userEntity)

@NamedQuery "findProgramOfStudyByName"
role to users relationship is @OneToMany - a user can have one role only

@NamedQuery "findTermByName"
a user can have many file: relationship is @OneToMany


In class HbnUserEntityDao I removed all the JdbcTemplate SQL statements.


When AO creates an account for an applicant.
Auto generate unique username for the applicant.
Make sure the email is not already taken too.
createUserEntityAsAO(UserEntity userEntity, Errors errors)

Replaced DB