我有三个班级 - >元数据,MetadataValue和MetadataMetadataValue:
private long id;
private Metadata parent;
private long levelInTree;
private String code;
private String nameEn;
private String nameFr;
private String descriptionEn;
private String descriptionFr;
private String query;
private String metadataType;
private String dataType;
private String permittedAsNeighbour;
private String visibility;
private long timeToLive;
private Set<MetadataMetadataValue> metadataMetadataValueList = new HashSet<MetadataMetadataValue>();
private long id;
private String valueEn;
private String valueFr;
private String code;
private String codeExample;
private Set<MetadataMetadataValue> metadataMetadataValueList = new HashSet<MetadataMetadataValue>();
private long id;
private Metadata metadata;
private MetadataValue metadataValue;
private long valOrder;
每个类都有一个Hibernate映射文件。
协会是:
“元数据”一对多“MetadataMetadataValue”多对一“MetadataValue”
我必须进行查询以获取对应于“元数据”对象的所有“MetadataValue”对象。
谢谢
答案 0 :(得分:0)
select mv.metadataValue from MetadataMetadataValue mv where mv.metadata=:object