0

so i am using entity graph to make a dynamic query of a table, the query is being made correctly which is corresponding to my graph and subgraph attribute nodes but when i fetch it as the entity, the basic entity with the eager relations and normal fields is fetched and no subgraphs are included. i am using fetchgraph as a hint for hibernate. so for example the query would be this:

select
    s1_0."StudentUserId",
    s1_0."AcceptanceAllocationId",
    s1_0."BusinessId",
    s1_0."CatalogId",
    s1_0."ConsultantUserId",
    s1_0."CourseStudyId",
    s1_0."CreateDate",
    s1_0."CreatorId",
    s1_0."DeactivationRegulationId",
    s1_0."DeletedStudentNumber",
    s1_0."EntranceTermId",
    s1_0."FacultyId",
    s1_0."FinalAllocationId",
    s1_0."GallantryId",
    s1_0."GraduateStudyLevelId",
    s1_0."Is2ndStudy",
    s1_0."IsFreeZoneNative",
    s1_0."IsGenius",
    s1_0."IsIncludedQuorum",
    s1_0."IsSacrificial",
    s1_0."IsStudentDeleted",
    s1_0."IsUserDeleted",
    s1_0."LastFinancialUpdate",
    s1_0."LastStudentLessonCatalogUpdate",
    m1_0."MedicalRotationTypeId",
    m1_0."ComprehensiveExamId",
    m1_0."CourseCode",
    m1_0."CourseStudyId",
    m1_0."CreateDate",
    m1_0."CreatorId",
    m1_0."DomainId",
    m1_0."IsActive",
    m1_0."IsRotational",
    m1_0."MedicalRotationLength",
    m1_0."MedicalRotationMinAverage",
    m1_0."MedicalRotationMinConditionalAverage",
    m1_0."MedicalRotationMinConditionalUnit",
    m1_0."MedicalRotationPassedUnit",
    m1_0."MedicalRotationTypeSetId",
    m1_0."ModifierId",
    m1_0."ModifyDate",
    m1_0."Priority",
    m1_0."StandardCode",
    m1_0."Title",
    s1_0."MedicalRotationTypeId",
    s1_0."ModifierId",
    s1_0."ModifyDate",
    s1_0."OldGallantryId",
    s1_0."PreCourseStudyRelationTypeId",
    s1_0."ProfessorUserId",
    s1_0."RegisterAllocationId",
    s1_0."RuleId",
    s1_0."SpecialtyFieldId",
    s1_0."StartDate",
    s1_0."StopDate",
    s1_0."StudentNumber",
    s1_0."StudentTransmissionDate",
    s1_0."StudentStatusId",
    s1_0."StudentTransmissionFromUniversityId",
    s1_0."StudentTransmissionTermId",
    s1_0."StudyingModeId",
    s1_0."StudyLevelId",
    s1_0."StudyLevelTypeId",
    s1_0."SubCourseStudyId",
    s1_0."SupporterUserId",
    s1_0."TrainingMethodId",
    s1_0."TransferDate",
    s1_0."TransmissionId",
    s1_0."TuitionPaymentTypeId",
    s1_0."ValidationHash"
from
    "Education"."Students" s1_0
        left join
    "Education"."MedicalRotationTypes" m1_0
    on m1_0."MedicalRotationTypeId"=s1_0."MedicalRotationTypeId"
where
    s1_0."StudentUserId"=?
order by
    s1_0."ModifyDate" desc

but there is no medicalrotationtype is added to the entity and it does its own fetches of the database.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.