I am facing an issue with a class generated with the database table mapping wizard. The table is in a postgres database, and is defined like this:
CREATE TABLE event
id serial NOT NULL,
description character varying(4000),
endwhen timestamp without time zone NOT NULL,
slots integer NOT NULL,
startwhen timestamp without time zone NOT NULL,
title character varying(255),
eventtype_id integer NOT NULL,
owner_id integer NOT NULL,
organization character varying(255) NOT NULL,
CONSTRAINT event_pkey PRIMARY KEY (id),
CONSTRAINT fk403827a8337183 FOREIGN KEY (eventtype_id)
REFERENCES eventtype (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk403827a9ee32829 FOREIGN KEY (owner_id)
REFERENCES users (userid) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION
If I create a simple report definition against this class and attempt to run it, I receive:
** ** No enum constant com.pega.pegarules.data.external.rd.constants.ColumnType.SERIAL ** No enum constant com.pega.pegarules.data.external.rd.constants.ColumnType.SERIAL
Is PRPC unable to handle the "serial" (autoincrement) type on the id column?
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
I am running Pega 7.4 and my data model also calls for the use of Serial columns in Postgres. I get the same error message. Am I correct in thinking that support for Serial columns has not changed since the original post?
I was facing the same issue - one workaround is to create a view on top of the table, and map your class to the view. The view will present the auto-incrementing column as an integer type, which can be mapped to your data class, at least in 7.2.2.