From 1ce7169e0e2d809aec45e80444146f59a9b8eda8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 9 Apr 2020 00:23:40 +0200 Subject: [PATCH] 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. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- src/org/mxchange/jcontacts/model/contact/UserContact.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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") -- 2.39.5