I have created a custom content type, 'cu_sequence', whitch has been registered with the root folder (-100) while I'm testing...:
select content_folder__register_content_type(
-100, -- folder_id
'cu_sequence', -- content_type
'f' -- include_subtypes
);
It is possible to create an item by calling my content type's "new" function with NULL as parent_id:
dotlrn-test=# select cu_sequence__new (
3238 , -- sequence_id
null , -- parent_id
'Tree Test20' , -- name
null , -- title
null , -- description
'text/plain' , -- mime_type
2721 , -- owner_id
3093 , -- package_id
'cu_sequence' , -- content_type
2721 , -- creation_user
'127.0.0.1' , -- creation_ip
null , -- context_id
'f' , -- is_live
'text' -- storage_type
);
dotlrn-test#
cu_sequence__new
------------------
3238
(1 row)
However, when I grab a new object_id and use it as the item_id while using the existing item_id (3238) as parent_id to the new item, in order to create a child item, I get the following error:
dotlrn-test=# select cu_sequence__new (
3244, -- sequence_id
3238 , -- parent_id
'Tree Test21' , -- name
null , -- title
null , -- description
'text/plain' , -- mime_type
2721 , -- owner_id
3093 , -- package_id
'cu_sequence' , -- content_type
2721 , -- creation_user
'127.0.0.1' , -- creation_ip
null , -- context_id
'f' , -- is_live
'text' -- storage_type
);
dotlrn-test=#
ERROR: -20000: This items content type cu_sequence is not allowed in this container 3238
How do I permit an item to "contain" another item of the same (or different) content type?
Thanks,