Resolved JPA validation errors
These were partially caused by an old Hibernate validator which has now been replaced by the EclipseLink validator for the current JPA standard. Another error was caused by the use of non-standard JPQL in the user search query which has now been replaced by a standardized one.
This commit is contained in:
parent
34d4a15fb1
commit
fd1d7e5473
@ -1,3 +1,3 @@
|
|||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jpt.core.platform=hibernate2_1
|
org.eclipse.jpt.core.platform=eclipselink2_5
|
||||||
org.eclipse.jpt.jpa.core.discoverAnnotatedClasses=true
|
org.eclipse.jpt.jpa.core.discoverAnnotatedClasses=true
|
||||||
|
@ -31,9 +31,10 @@ import envoy.data.User.UserStatus;
|
|||||||
@NamedQuery(
|
@NamedQuery(
|
||||||
name = User.findContacts,
|
name = User.findContacts,
|
||||||
query = "SELECT u.contacts FROM User u WHERE u = :user"
|
query = "SELECT u.contacts FROM User u WHERE u = :user"
|
||||||
), @NamedQuery(
|
),
|
||||||
|
@NamedQuery(
|
||||||
name = User.searchByName,
|
name = User.searchByName,
|
||||||
query = "SELECT u FROM User u WHERE (lower(u.name) LIKE lower(:searchPhrase) AND u <> :context AND NOT :context in elements(u.contacts))"
|
query = "SELECT u FROM User u WHERE (lower(u.name) LIKE lower(:searchPhrase) AND u <> :context AND :context NOT MEMBER OF u.contacts)"
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
public class User extends Contact {
|
public class User extends Contact {
|
||||||
|
Reference in New Issue
Block a user