Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix feature analysis endpoint #2437

Merged
merged 2 commits into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ public void deleteAnalysis(@PathParam("id") final Integer feAnalysisId) {
* @return ID, type, name domain, description, etc of feature analysis
*/
@GET
@Transactional
@Path("/{id}")
@Produces(MediaType.APPLICATION_JSON)
public FeAnalysisDTO getFeAnalysis(@PathParam("id") final Integer feAnalysisId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.ohdsi.webapi.feanalysis.dto.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.hibernate.Hibernate;

import java.util.List;
import java.util.Objects;
Expand Down Expand Up @@ -46,6 +47,7 @@ private Object convertDesignToJson(final FeAnalysisEntity source) {
switch (source.getType()) {
case CRITERIA_SET:
FeAnalysisWithCriteriaEntity<?> sourceWithCriteria = (FeAnalysisWithCriteriaEntity<?>) source;
Hibernate.initialize(sourceWithCriteria.getDesign()); // Explicitly initialize the collection
return sourceWithCriteria.getDesign()
.stream()
.map(this::convertCriteria)
Expand Down
Loading