I just want to know if it possible to map GORM properties to fields in Postgres table where the data type is the postgres domain. I am getting an error when it is validating. Thanks
Domain class:
class Userprofile {
long iduser
String username
static mapping = {
datasource 'ALL'
id name: 'iduser'
version false
}
}
Table in postgres:
security.userprofile
(
iduser "Primary Key Id" NOT NULL DEFAULT nextval('security.userprofile_seq'::regclass),
username "General Name" NOT NULL,
)
CREATE DOMAIN "Primary Key Id" AS bigint;
CREATE DOMAIN "General Name" AS character varying(100) COLLATE pg_catalog."default";
I have set the dbCreate to "validate" in datasource and i was getting this error message when validating the db:
Caused by HibernateException: Wrong column type in userprofile for column iduser. Found: primary, expected: int8