java - Where 子句在 Hibernate 5 XML 映射中不起作用
问题描述
我使用了带有 XML 映射的 Hibernate 4,代码是:
<map name="scormData" table="scorm_data_attempt" where="current">
<key>
<column name="userid" />
<column name="course_id" />
</key>
<composite-map-key class="ScormDataKey">
<key-property name="scormId" column="scorm_id"
type="integer" />
<key-property name="variableName" column="variable_name"
type="string" />
<key-property name="attempt" />
</composite-map-key>
<element type="string" column="variable_value" />
</map>
但是,现在当我更改为 Hibernate 5 时,where 字段不再起作用,我无法从当前列中检索数据。有谁知道为什么以及如何解决它?
解决方案
推荐阅读
- spring-boot - GCP 和 Spring 回退。严重性始终是信息
- ef-code-first - EF Core 模型快照在添加迁移和更新之间不同步
- mapbox-gl-js - 如何从 geojson 文件中获取多边形的坐标并从中挤出 3D 多边形?
- python - 测试装饰器返回值时出错
- node.js - 您可以在 .env 文件的变量中分配多个参数吗?
- php - 为 Eloquent 集合创建一个新的空属性
- python - 遍历存储在列表中的注册表项
- javascript - javascript计算总计结果变成双倍
- position - plotly 中是否有类似于 R 中的 hjust/vjust 或 position_dodge 的功能?
- machine-learning - 二元或分类图像分类?