Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GRIN-Global Server
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
25
Issues
25
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
GRIN-Global
GRIN-Global Server
Commits
61e65a13
Commit
61e65a13
authored
Aug 13, 2020
by
Matija Obreza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: Added missing fetch join RepositoryFile in find*Attachments()
parent
d04db54f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
src/main/java/org/gringlobal/persistence/AccessionInvAttachRepositoryCustomImpl.java
...l/persistence/AccessionInvAttachRepositoryCustomImpl.java
+6
-1
No files found.
src/main/java/org/gringlobal/persistence/AccessionInvAttachRepositoryCustomImpl.java
View file @
61e65a13
...
@@ -38,15 +38,20 @@ public class AccessionInvAttachRepositoryCustomImpl implements AccessionInvAttac
...
@@ -38,15 +38,20 @@ public class AccessionInvAttachRepositoryCustomImpl implements AccessionInvAttac
@Override
@Override
public
List
<
AccessionInvAttach
>
findAccessionAttachments
(
Accession
accession
,
String
formTypeCode
)
{
public
List
<
AccessionInvAttach
>
findAccessionAttachments
(
Accession
accession
,
String
formTypeCode
)
{
BooleanExpression
expression
=
QAccessionInvAttach
.
accessionInvAttach
.
inventory
.
accession
.
eq
(
accession
);
BooleanExpression
expression
=
QAccessionInvAttach
.
accessionInvAttach
.
inventory
.
accession
.
eq
(
accession
);
if
(
StringUtils
.
isNotBlank
(
formTypeCode
))
{
if
(
StringUtils
.
isNotBlank
(
formTypeCode
))
{
expression
=
expression
.
and
(
QAccessionInvAttach
.
accessionInvAttach
.
inventory
.
formTypeCode
.
eq
(
formTypeCode
));
expression
=
expression
.
and
(
QAccessionInvAttach
.
accessionInvAttach
.
inventory
.
formTypeCode
.
eq
(
formTypeCode
));
}
}
return
jpaQueryFactory
.
selectFrom
(
QAccessionInvAttach
.
accessionInvAttach
).
where
(
expression
).
fetch
();
return
jpaQueryFactory
.
selectFrom
(
QAccessionInvAttach
.
accessionInvAttach
)
.
join
(
QAccessionInvAttach
.
accessionInvAttach
.
repositoryFile
).
fetchJoin
()
.
where
(
expression
).
fetch
();
}
}
@Override
@Override
public
List
<
AccessionInvAttach
>
findInventoryAttachments
(
Inventory
inventory
)
{
public
List
<
AccessionInvAttach
>
findInventoryAttachments
(
Inventory
inventory
)
{
return
jpaQueryFactory
.
selectFrom
(
QAccessionInvAttach
.
accessionInvAttach
)
return
jpaQueryFactory
.
selectFrom
(
QAccessionInvAttach
.
accessionInvAttach
)
.
join
(
QAccessionInvAttach
.
accessionInvAttach
.
repositoryFile
).
fetchJoin
()
.
where
(
QAccessionInvAttach
.
accessionInvAttach
.
inventory
.
eq
(
inventory
)).
fetch
();
.
where
(
QAccessionInvAttach
.
accessionInvAttach
.
inventory
.
eq
(
inventory
)).
fetch
();
}
}
}
}
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