Signed-off-by:Roland Häder <roland@mxchange.org>
@Table (name = "addressbook_entries")
@NamedQueries (
@NamedQuery (
- name = "AllAddressbookEntries",
- query = "SELECT e FROM addressbook_entries AS e WHERE e.addressbookId = :addressbook AND (e.addressbookEntryUserOwner = :owner OR e.addressbookEntryUserSharer = :sharer) ORDER BY e.addressbookEntryId ASC")
+ name = "SearchUsersAddressbookEntries",
+ query = "SELECT e FROM addressbook_entries AS e INNER JOIN addressbooks AS a ON e.addressbookId = a.addressbookId WHERE e.addressbookId = :addressbook AND a.addressbookUser = :owner ORDER BY e.addressbookEntryId ASC")
)
public class UserAddressbookEntry implements AddressbookEntry, Comparable<AddressbookEntry> {