Index: openacs-4/packages/acs-content-repository/sql/oracle/content-type.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/oracle/content-type.sql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-content-repository/sql/oracle/content-type.sql	11 May 2001 04:43:39 -0000	1.2
+++ openacs-4/packages/acs-content-repository/sql/oracle/content-type.sql	5 Mar 2003 17:01:46 -0000	1.3
@@ -56,9 +56,22 @@
 
   table_exists integer;
   v_supertype_table acs_object_types.table_name%TYPE;
-
+  v_count       integer;
 begin
 
+  if (supertype != 'content_revision') and (content_type != 'content_revision') then
+    select count(*)
+    into  v_count
+    from  acs_object_type_supertype_map
+    where object_type = create_type.supertype
+    and   ancestor_type = 'content_revision';
+
+    if v_count = 0 then
+        raise_application_error(-20000, 'Content types can only be created as subclasses of content_revision or a derivation thereof. ' || supertype || ' is not a subclass oc content_revision.');
+    end if;
+  end if;
+
+
  -- create the attribute table if not already created
 
   select decode(count(*),0,0,1) into table_exists from user_tables 
