Implemented user search response

This commit is contained in:
2020-02-08 13:53:58 +01:00
parent e73ad7b871
commit 33dc6ba4ac
5 changed files with 41 additions and 5 deletions

View File

@ -22,8 +22,8 @@ import javax.persistence.*;
@Table(name = "users")
@NamedQueries(
{ @NamedQuery(query = "SELECT u FROM User u WHERE u.name = :name", name = "getUserByName"),
@NamedQuery(query = "SELECT u.contacts FROM User u WHERE u = :user", name = "getContactsOfUser")// not tested
}
@NamedQuery(query = "SELECT u.contacts FROM User u WHERE u = :user", name = "getContactsOfUser"), // not tested
@NamedQuery(query = "SELECT u FROM User u WHERE lower(u.name) LIKE lower(:searchPhrase)", name = "searchUsers") }
)
public class User {