We generate DDL scripts based on Hibernate mappings. We need to name the primary keys (due to our customer's wish) like
Constraint PK_ADDRESS primary key (ADDRESS_ID)
Our mapping
<class name="Address" table="ADDRESS">
<id column="ADDRESS_ID" name="pk" type="java.lang.Long">
<generator class="sequence" />
</id>
...
result in the following output
create table ADDRESS (
ADDRESS_ID number(19,0) not null,
…
primary key (ADDRESS_ID)
);
Does anyone know how to add the name to a primary key? We use 'foreign-key' to name the foreign keys, it works properly.
Thanks!
|