带有Hibernate的Postgres自定义数组

时间:2018-07-27 12:41:50

标签: java postgresql hibernate

我已经在PostgreSQL中创建了这样的类型:

CREATE TYPE BusinessUnit AS
(
  businessUnitId BIGINT,
  name VARCHAR(255),
  pct_source_id BIGINT,
  included_in_lems BOOLEAN
);

我在Entity类中将其用作BusinessUnit []。所以我需要编写自定义的BusinessUnitArrayUserType

如何为此编写自定义UserType?

0 个答案:

没有答案