liferay - 将 liferay 5.2.3 升级到 6.0.6 时出错 密钥“PRIMARY”的重复条目“”
问题描述
我正在尝试将 liferay 5.2.3 升级到 6.0.6,并且此代码发生了 tagsAsset 表中的异常主键等于assetEntry 表中的主键,并且此代码希望从 tagsAsset 中选择并插入发生异常的assetEntry:
con = DataAccess.getConnection();
ps = con.prepareStatement("select * from TagsAsset");
rs = ps.executeQuery();
while (rs.next()) {
long assetId = rs.getLong("assetId");
long groupId = rs.getLong("groupId");
long companyId = rs.getLong("companyId");
long userId = rs.getLong("userId");
String userName = rs.getString("userName");
Timestamp createDate = rs.getTimestamp("createDate");
Timestamp modifiedDate = rs.getTimestamp("modifiedDate");
long classNameId = rs.getLong("classNameId");
long classPK = rs.getLong("classPK");
boolean visible = rs.getBoolean("visible");
Timestamp startDate = rs.getTimestamp("startDate");
Timestamp endDate = rs.getTimestamp("endDate");
Timestamp publishDate = rs.getTimestamp("publishDate");
Timestamp expirationDate = rs.getTimestamp("expirationDate");
String mimeType = rs.getString("mimeType");
String title = rs.getString("title");
String description = rs.getString("description");
String summary = rs.getString("summary");
String url = rs.getString("url");
int height = rs.getInt("height");
int width = rs.getInt("width");
double priority = rs.getDouble("priority");
int viewCount = rs.getInt("viewCount");
addEntry(
assetId, groupId, companyId, userId, userName, createDate,
modifiedDate, classNameId, classPK, visible, startDate,
endDate, publishDate, expirationDate, mimeType, title,
description, summary, url, height, width, priority,
viewCount);
解决方案
推荐阅读
- azure - Azure 持久功能 用于高吞吐量/低延迟?
- python - pip install AttributeError: _DistInfoDistribution__dep_map
- python - Python NetworkX 将 Panda 的整数转换为浮点数
- python-3.x - Python Tkinter 菜单栏未显示
- aws-xray - aws xray:跟踪中缺少 sql 查询和 django 用户
- r - R不会将直方图编织为PDF
- javascript - 在javascript中获取函数声明的路径
- python - 使用 for 循环的函数,在达到特定数字之前对列表中的数字求和
- r - 重复多个列元素可变次数
- react-native - React Native 渲染组件