简体   繁体   English

如何在Intershop7.9中为自定义对象创建数据库表

[英]How to create DB tables for custom objects in Intershop7.9

We are trying to insert tables for custom objects in Intershop database. 我们正在尝试为Intershop数据库中的自定义对象插入表。 We are creating the ORM model through EDL files and generating the code with "Intershop Code generator for versions 7.2 and later", however there is no option to generate DDL schema for tables, as it was possible in Enfinity Studio 6.4. 我们正在通过EDL文件创建ORM模型,并使用“适用于7.2版及更高版本的Intershop代码生成器”生成代码,但是没有选择为表生成DDL模式的选项,因为在Enfinity Studio 6.4中是可能的。

Code generator screenshot - Intershop 7 Studio 代码生成器屏幕截图-Intershop 7 Studio

On the Intershop support site there is a description on how to execute only the DDL preparers during the dbinit, but only for version 7.10 which is in beta phase. 在Intershop支持站点上,描述了如何在dbinit期间仅执行DDL准备器,但仅针对处于beta阶段的7.10版本。

Is it possible to init only the custom DB tables in Intershop 7.9 or to generate the DDL schema which can be executed on the DB directly? 是否可以仅在Intershop 7.9中初始化自定义数据库表或生成可以直接在数据库上执行的DDL模式? We do not want to run the whole dbinit process each time we need to create a new custom object in the DB. 我们不想每次需要在数据库中创建新的自定义对象时都运行整个dbinit进程。

For 7.x you don't need to generate the DDL for creating the tables. 对于7.x,您不需要生成用于创建表的DDL。 That is now handled by the prepares. 现在由准备人员处理。 You can use these dbmigration prepares to create the tables for you. 您可以使用这些dbmigration准备为您创建表。

Class1 = com.intershop.beehive.core.dbmigrate.preparer.database.DatabaseTablesPreparer

Class2 = com.intershop.beehive.core.dbmigrate.preparer.database.DatabaseIndexesPreparer \
         resources/custom_cartridge/dbinit/scripts/1.0.0.0/dbindex.ddl

Class3 = com.intershop.beehive.core.dbmigrate.preparer.database.DatabaseConstraintsPreparer \
         resources/custom_cartridge/dbinit/scripts/1.0.0.0/dbconstraints.ddl

As you can see above you still get the DDL for the constraints and indexes 如上所示,您仍然可以获得约束和索引的DDL

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM