Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
reg-app
Regapp
Commits
7efcaf6b
Commit
7efcaf6b
authored
Feb 05, 2021
by
michael.simon
Browse files
usage of type() is hard
parent
30f0df4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
bwreg-jpa/src/main/java/edu/kit/scc/webreg/dao/jpa/JpaRegistryDao.java
View file @
7efcaf6b
...
...
@@ -136,8 +136,8 @@ public class JpaRegistryDao extends JpaBaseDao<RegistryEntity, Long> implements
@SuppressWarnings
(
"unchecked"
)
@Override
public
List
<
RegistryEntity
>
findAllExternalBySsn
(
String
serviceShortName
)
{
return
em
.
createQuery
(
"select r from RegistryEntity r where r.service.shortName = :ssn and "
+
"
TYPE(r.user.class
) = :class"
)
return
em
.
createQuery
(
"select r from RegistryEntity r
, UserEntity u
where r.service.shortName = :ssn and "
+
"
r.user = u and TYPE(u
) = :class"
)
.
setParameter
(
"ssn"
,
serviceShortName
)
.
setParameter
(
"class"
,
ExternalUserEntity
.
class
)
.
getResultList
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment