From: Roland Häder Date: Wed, 8 Apr 2020 22:23:40 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1ce7169e0e2d809aec45e80444146f59a9b8eda8;p=jcontacts-core.git Continued: - SearchContact is a relict from older times. It can be avoided by using AllContacts + iterate over the whole list and find the wished entry. Sure this consumes more memory than using SearchContact (by id) but that is okay since modern servers have a lot RAM. Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/jcontacts/model/contact/UserContact.java b/src/org/mxchange/jcontacts/model/contact/UserContact.java index 748ed28..ec5f8b6 100644 --- a/src/org/mxchange/jcontacts/model/contact/UserContact.java +++ b/src/org/mxchange/jcontacts/model/contact/UserContact.java @@ -68,8 +68,7 @@ import org.mxchange.jphone.model.phonenumbers.mobile.MobileNumber; ) @NamedQueries ( { - @NamedQuery (name = "AllContacts", query = "SELECT c FROM contacts AS c ORDER BY c.contactId ASC"), - @NamedQuery (name = "SearchContact", query = "SELECT c FROM contacts AS c WHERE c = :contact") + @NamedQuery (name = "AllContacts", query = "SELECT c FROM contacts AS c ORDER BY c.contactId ASC") } ) @SuppressWarnings ("PersistenceUnitPresent")