Mapping:
<class …>
…
<natural-id>
<property
name="name"
column="name"
type="string" />
</natural-id>
…
</class>
Table Structure (in PostgreSQL):
CREATE TABLE xyz
(
id bigint NOT NULL,
"name" character varying(255) NOT NULL,
CONSTRAINT xyz_pkey PRIMARY KEY (id),
CONSTRAINT xyz_name_ukey UNIQUE (name)
)
No comments:
Post a Comment