- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我们注意到在 Intershop DB 中,自从从 7.9 版本迁移到 7.10 版本后,备用键的索引不会生成为 UNIQUE INDEX。这导致所有包含备用键(系统和自定义对象)的表在数据库中使用非唯一索引生成。例如:
此外,生成的 .ddl 文件代码 (CatalogCategoryLinkPO.dbindex.oracle.ddl):
/*
=============================================================================
File: CatalogCategoryLinkPO.dbindex.oracle.ddl
Generated by JGen Code Generator from INTERSHOP Communications AG.
=============================================================================
The JGen Code Generator software is the property of INTERSHOP Communications AG.
Any rights to use are granted under the license agreement.
=============================================================================
*/
SET ECHO ON
SET SERVEROUTPUT ON SIZE 1000000
VARIABLE table_space VARCHAR2(50)
VARIABLE recreate_indexes NUMBER;
EXEC :table_space := '&index_tablespace';
EXEC :recreate_indexes := '&recreate_indexes';
PROMPT /* Class com.intershop.beehive.xcs.internal.catalog.CatalogCategoryLinkPO */
PROMPT -- Foreign key indices
EXEC staging_ddl.create_index('CATALOGCATEGORYLINK_FK999', 'CATALOGCATEGORYLINK', '(TARGETCATEGORYID)', :table_space, 'NONUNIQUE', :recreate_indexes);
EXEC staging_ddl.create_index('CATALOGCATEGORYLINK_FK998', 'CATALOGCATEGORYLINK', '(SOURCECATEGORYID)', :table_space, 'NONUNIQUE', :recreate_indexes);
PROMPT -- Foreign key indices (dependencies)
EXEC staging_ddl.create_index('CATALOGCATEGORYLINK_FK997', 'CATALOGCATEGORYLINK', '(DOMAINID)', :table_space, 'NONUNIQUE', :recreate_indexes);
PROMPT -- Inversion Entry key indices
EXEC staging_ddl.create_index('CATALOGCATEGORYLINK_IE001', 'CATALOGCATEGORYLINK', '(TYPECODE)', :table_space, 'NONUNIQUE', :recreate_indexes);
EXEC staging_ddl.create_index('CATALOGCATEGORYLINK_IE002', 'CATALOGCATEGORYLINK', '(SOURCECATEGORYID,TARGETCATEGORYID,DOMAINID,TYPECODE)', :table_space, 'UNIQUE', :recreate_indexes);
PROMPT -- Searchable attribute indices
EXEC staging_ddl.create_index('CATALOGCATEGORYLINK_IE999', 'CATALOGCATEGORYLINK', '(DOMAINID)', :table_space, 'NONUNIQUE', :recreate_indexes);
EXEC staging_ddl.create_index('CATALOGCATEGORYLINK_AK001', 'CATALOGCATEGORYLINK', '(SOURCECATEGORYID,TARGETCATEGORYID,DOMAINID,TYPECODE)', :table_space, 'NONUNIQUE', :recreate_indexes);
PROMPT /* Class com.intershop.beehive.xcs.internal.catalog.CatalogCategoryLinkPOAttributeValue */
PROMPT -- Foreign key indices
EXEC staging_ddl.create_index('CATALOGCATEGORYLINK_AV_FK002', 'CATALOGCATEGORYLINK_AV', '(ownerID)', :table_space, 'NONUNIQUE', :recreate_indexes);
PROMPT -- Inversion Entry key indices
EXEC staging_ddl.create_index('CATALOGCATEGORYLINK_AV_IE002', 'CATALOGCATEGORYLINK_AV', '(intValue)', :table_space, 'NONUNIQUE', :recreate_indexes);
EXEC staging_ddl.create_index('CATALOGCATEGORYLINK_AV_IE003', 'CATALOGCATEGORYLINK_AV', '(doubleValue)', :table_space, 'NONUNIQUE', :recreate_indexes);
当我们尝试为我们自己的自定义实现对象创建备用键时,也会发生同样的事情。例如,这是 .edl 代码片段:
orm class A1PromotionBenefitPO extends PersistentObjectPO implements A1PromotionBenefit table "A1PromotionBenefit"
{
/**
* Declare alternate key.
*/
alternate key (promotionUUID, tariffUUID, contractType, contractBinding, domainID);
/**
* Holds link to tariff.
*/
attribute tariffUUID : uuid required searchable;
/**
* Holds link to promotion.
*/
attribute promotionUUID: uuid required;
....
...
这是生成的 .ddl 文件 (A1PromotionBenefitPO.dbindex.oracle.ddl):
/*
=============================================================================
File: A1PromotionBenefitPO.dbindex.oracle.ddl
Generated by JGen Code Generator from INTERSHOP Communications AG.
=============================================================================
The JGen Code Generator software is the property of INTERSHOP Communications AG.
Any rights to use are granted under the license agreement.
=============================================================================
*/
SET ECHO ON
SET SERVEROUTPUT ON SIZE 1000000
VARIABLE table_space VARCHAR2(50)
VARIABLE recreate_indexes NUMBER;
EXEC :table_space := '&index_tablespace';
EXEC :recreate_indexes := '&recreate_indexes';
PROMPT /* Class hr.a1.orm.promotion.internal.A1PromotionBenefitPO */
PROMPT -- Foreign key indices
EXEC staging_ddl.create_index('A1PROMOTIONBENEFIT_FK999', 'A1PROMOTIONBENEFIT', '(DISCOUNTUUID)', :table_space, 'NONUNIQUE', :recreate_indexes);
EXEC staging_ddl.create_index('A1PROMOTIONBENEFIT_FK998', 'A1PROMOTIONBENEFIT', '(PROMOTIONUUID)', :table_space, 'NONUNIQUE', :recreate_indexes);
PROMPT -- Foreign key indices (dependencies)
EXEC staging_ddl.create_index('A1PROMOTIONBENEFIT_FK997', 'A1PROMOTIONBENEFIT', '(DOMAINID)', :table_space, 'NONUNIQUE', :recreate_indexes);
EXEC staging_ddl.create_index('A1PROMOTIONBENEFIT_FK996', 'A1PROMOTIONBENEFIT', '(TARIFFUUID)', :table_space, 'NONUNIQUE', :recreate_indexes);
PROMPT -- Inversion Entry key indices
EXEC staging_ddl.create_index('A1PROMOTIONBENEFIT_IE001', 'A1PROMOTIONBENEFIT', '(PROMOTIONUUID,TARIFFUUID,CONTRACTTYPE,CONTRACTBINDING,DOMAINID)', :table_space, 'UNIQUE', :recreate_indexes);
PROMPT -- Searchable attribute indices
EXEC staging_ddl.create_index('A1PROMOTIONBENEFIT_IE999', 'A1PROMOTIONBENEFIT', '(DOMAINID)', :table_space, 'NONUNIQUE', :recreate_indexes);
EXEC staging_ddl.create_index('A1PROMOTIONBENEFIT_IE998', 'A1PROMOTIONBENEFIT', '(TARIFFUUID)', :table_space, 'NONUNIQUE', :recreate_indexes);
EXEC staging_ddl.create_index('A1PROMOTIONBENEFIT_AK001', 'A1PROMOTIONBENEFIT', '(PROMOTIONUUID,TARIFFUUID,CONTRACTTYPE,CONTRACTBINDING,DOMAINID)', :table_space, 'NONUNIQUE', :recreate_indexes);
如您所见,备用键索引 A1PROMOTIONBENEFIT_AK001 生成为 NONUNIQUE。
你知道为什么会这样吗?我们的代码依赖于备用键,因此我们不想从我们的 orm 模型中一起删除备用键。
最佳答案
这似乎真的是 7.10 引入的错误。您应该向 Intershop 支持提交错误报告。
作为解决方法,您当然可以更改生成的 DDL 文件。不确定您最终是否可以更改用作生成这些 DDL 文件的模板的 ORMDDL.xpt。
我在内部创建了一个错误,当您向 Intershop 支持提交错误报告时,请引用问题 IS-26076。通过支持,您将获得状态更新。
关于indexing - Intershop 7.10 代码生成器备用键生成 - NONUNIQUE,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54517413/
我们注意到在 Intershop DB 中,自从从 7.9 版本迁移到 7.10 版本后,备用键的索引不会生成为 UNIQUE INDEX。这导致所有包含备用键(系统和自定义对象)的表在数据库中使用非
我正在开发一个 Spring-MVC 应用程序,到目前为止我们只有一个数据源。对于我们的要求,大多数事务都是短暂的,我们确实有很少需要很长时间来处理的应用程序。为了避免系统因这些请求而堵塞,我们计划创
我是一名优秀的程序员,十分优秀!