session.createQuery("select ccrd.createdDate , s1 "
+ "from CrComponentRelDependency ccrd "
+ "left outer join ccrd.crComponentDependencyDtls s1 "
+ "where ccrd.crComponent.componentSeq= :COMPONENT_SEQ "
+ "and (ccrd.referencedComponentVer IS NULL) "
.setParameter("COMPONENT_SEQ", componentId);
此查询为ccrd.createdDate提供有效值,但它为s1实体返回 NULL。我已经定义了CrComponentRelDependency和crComponentDependencyDtls之间的一对一关系。