I’m using postgress, I did find a solution, the following insert should be done for each table that the view was created from:
INSERT INTO gt_pk_metadata (table_schema, table_name, pk_column, pk_policy) VALUES ('’, ‘
’, ‘’, ‘assigned’);
Thanks
Mike
From: Corliss, Donovan [mailto:Donovan.Corliss@anonymised.com]
Sent: Thursday, October 10, 2013 12:09 PM
To: geoserver-users@anonymised.comrceforge.net
Subject: Re: [Geoserver-users] No primary key or unique index found for
I ran into this error previously when using Oracle as the backend database for my layer. As the error suggested, I created a unique index on the view, republished the layer, and it worked. What database are you using?
In Oracle you can create constraints on views:
Sample from documentation
CREATE VIEW emp_sal (emp_id, last_name,
email UNIQUE,
CONSTRAINT id_pk PRIMARY KEY (emp_id))
AS SELECT employee_id, last_name, email FROM employees;
Donovan
From: Michael Sacauskis [mailto:msacauskis@anonymised.com]
Sent: Thursday, October 10, 2013 10:25 AM
To: geoserver-users@lists.sourceforge.net
Subject: [Geoserver-users] No primary key or unique index found for
I’m getting the following error “23:38:06,673 WARN [org.geotools.jdbc] (MSC service thread 1-2) No primary key or unique index found for tcwradiuscf”. The error is occurring on a view. We’re using version 2.2.4.
Any help would be greatly appreciated.
Mike