Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/375.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PostgreSQL自定义用户类型(非java基本类型)到hibernate映射_Java_Hibernate_Postgresql - Fatal编程技术网

PostgreSQL自定义用户类型(非java基本类型)到hibernate映射

PostgreSQL自定义用户类型(非java基本类型)到hibernate映射,java,hibernate,postgresql,Java,Hibernate,Postgresql,我想知道如何在hibernate中映射这种场景。我在网上找到了很多答案。但这些都没有给出任何标准方法。我想知道在冬眠状态下这样做的正确方法 CREATE TYPE custom_type AS ( id int, amount numeric ); CREATE TABLE journal_entry ( id serial not null unique, date_time date not null, description text, custom_items custom_typ

我想知道如何在hibernate中映射这种场景。我在网上找到了很多答案。但这些都没有给出任何标准方法。我想知道在冬眠状态下这样做的正确方法

CREATE TYPE custom_type AS (
id int,
amount numeric
); 

CREATE TABLE journal_entry (
id serial not null unique,
date_time date not null,
description text, 
custom_items custom_type[]
);

我是PostgreSQL和hibernate的新手,请帮帮我?

这篇论坛帖子是否回答了你的问题:thankx man我认为它有一个很好的答案。这篇论坛帖子是否回答了你的问题:thankx man我认为它有一个很好的答案。