【问题标题】:SchemaExport using custom typesSchemaExport 使用自定义类型
【发布时间】:2012-06-27 17:52:49
【问题描述】:

我想使用 hibernate-core 4.1.4 中的 org.hibernate.tool.hbm2ddl.SchemaExport 来生成/导出 Sybase ASE 15.5 模式,其中特定列应创建为 UNIVARCHAR 而不是常规的 VARCHAR 数据类型。我怎么做?我首选的方式是使用注释。

【问题讨论】:

    标签: hibernate sap-ase schemaexport custom-type


    【解决方案1】:

    通过在 Column 注释中将 SQL 片段作为 columnDefinition 属性的值。

    例如:

    @Column(name="columnName", columnDefinition="univarchar(50)")
    

    【讨论】:

      猜你喜欢
      • 2019-08-14
      • 2020-10-22
      • 2021-01-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-03-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多