Index: openacs-4/packages/acs-kernel/sql/oracle/rel-constraints-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/rel-constraints-create.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/acs-kernel/sql/oracle/rel-constraints-create.sql	20 Mar 2001 22:51:55 -0000	1.1
+++ openacs-4/packages/acs-kernel/sql/oracle/rel-constraints-create.sql	30 Sep 2003 12:10:02 -0000	1.2
@@ -96,8 +96,12 @@
 -- where the relation's container_id (i.e., object_id_one) is not in the 
 -- relational segment required_rel_segment.
 
-create or replace view rel_constraints_violated_one as
-select constrained_rels.*
+create or replace view rel_constraints_violated_one as 
+select constrained_rels.constraint_id, constrained_rels.constraint_name,
+   constrained_rels.rel_id, constrained_rels.container_id,
+   constrained_rels.party_id, constrained_rels.rel_type, 
+   constrained_rels.rel_segment,constrained_rels.rel_side, 
+   constrained_rels.required_rel_segment
 from (select rel_constraints.constraint_id, rel_constraints.constraint_name, 
              r.rel_id, r.container_id, r.party_id, r.rel_type, 
              rel_constraints.rel_segment,
@@ -109,10 +113,9 @@
      ) constrained_rels,
      rel_segment_party_map rspm
 where rspm.segment_id(+) = constrained_rels.required_rel_segment
-  and rspm.party_id(+) = constrained_rels.container_id
+  and constrained_rels.container_id is null
   and rspm.party_id is null;
 
-
 -- View rel_constraints_violated_two
 --
 -- pseudo sql:
@@ -123,7 +126,11 @@
 -- relational segment required_rel_segment.
 
 create or replace view rel_constraints_violated_two as
-select constrained_rels.*
+select constrained_rels.constraint_id, constrained_rels.constraint_name,
+   constrained_rels.rel_id, constrained_rels.container_id,
+   constrained_rels.party_id, constrained_rels.rel_type, 
+   constrained_rels.rel_segment,constrained_rels.rel_side, 
+   constrained_rels.required_rel_segment
 from (select rel_constraints.constraint_id, rel_constraints.constraint_name, 
              r.rel_id, r.container_id, r.party_id, r.rel_type, 
              rel_constraints.rel_segment,
@@ -135,7 +142,7 @@
      ) constrained_rels,
      rel_segment_party_map rspm
 where rspm.segment_id(+) = constrained_rels.required_rel_segment
-  and rspm.party_id(+) = constrained_rels.party_id
+  and constrained_rels.party_id is null
   and rspm.party_id is null;
 
 
@@ -439,7 +446,7 @@
     creation_ip		in acs_objects.creation_ip%TYPE default null
   ) return rel_constraints.constraint_id%TYPE;
 
-  procedure delete (
+  procedure del (
     constraint_id	in rel_constraints.constraint_id%TYPE
   );
 
