From: Roland Haeder Date: Fri, 16 Oct 2015 08:34:04 +0000 (+0200) Subject: added missing named query SearchShareeAddressbookShare X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1f1a630d6dc7a49f9a39c088548841f98c65d908;p=jaddressbook-share-lib.git added missing named query SearchShareeAddressbookShare Signed-off-by:Roland Häder --- diff --git a/src/org/mxchange/addressbook/model/addressbook/shared/AddressbookShare.java b/src/org/mxchange/addressbook/model/addressbook/shared/AddressbookShare.java index a88a032..6e7e042 100644 --- a/src/org/mxchange/addressbook/model/addressbook/shared/AddressbookShare.java +++ b/src/org/mxchange/addressbook/model/addressbook/shared/AddressbookShare.java @@ -42,7 +42,16 @@ import org.mxchange.jusercore.model.user.User; @Entity (name = "addressbook_shares") @Table (name = "addressbook_shares") @NamedQueries ( - @NamedQuery (name = "SearchUserSharedAddressbooks", query = "SELECT s FROM addressbook_shares AS s WHERE s.shareUserOwner = :user ORDER BY s.shareId ASC") + { + @NamedQuery ( + name = "SearchUserSharedAddressbooks", + query = "SELECT s FROM addressbook_shares AS s WHERE s.shareUserOwner = :user ORDER BY s.shareId ASC" + ), + @NamedQuery ( + name = "SearchShareeAddressbookShare", + query = "SELECT s FROM addressbook_shares AS s WHERE s.shareAddressbook = :addressbook AND s.shareUserSharee = :sharee" + ) + } ) public class AddressbookShare implements ShareableAddressbook, Comparable {