From: Roland Haeder Date: Wed, 21 Oct 2015 10:27:50 +0000 (+0200) Subject: fixed query for new design + renamed it X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3bcf0df844bcf3fffdc4874301dc26df266ac9f9;p=jaddressbook-lib.git fixed query for new design + renamed it Signed-off-by:Roland Häder --- diff --git a/src/org/mxchange/addressbook/model/addressbook/entry/UserAddressbookEntry.java b/src/org/mxchange/addressbook/model/addressbook/entry/UserAddressbookEntry.java index 3b73258b..c858c276 100644 --- a/src/org/mxchange/addressbook/model/addressbook/entry/UserAddressbookEntry.java +++ b/src/org/mxchange/addressbook/model/addressbook/entry/UserAddressbookEntry.java @@ -48,8 +48,8 @@ import org.mxchange.jcontactsbusiness.CompanyContact; @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 {