xo::db::CrClass instproc create_object_type (public)

 <instance of xo::db::CrClass[i]> create_object_type

Defined in packages/xotcl-core/tcl/cr-procs.tcl

Create an oacs object_type and a table for keeping the additional attributes.

Partial Call Graph (max 5 caller/called nodes):
%3 test_xotcl_core_tutorial_4 xotcl_core_tutorial_4 (test xotcl-core) xo::db::CrClass instproc create_object_type xo::db::CrClass instproc create_object_type test_xotcl_core_tutorial_4->xo::db::CrClass instproc create_object_type

Testcases:
xotcl_core_tutorial_4
Source code:
:check_table_atts

set :supertype [:info superclass]
switch -- ${:supertype} {
  ::xotcl::Object -
  ::xo::db::CrItem {set :supertype content_revision}
}
if {![info exists :pretty_plural]} {set :pretty_plural ${:pretty_name}}

::xo::dc transaction {
  ::acs::dc call content_type create_type  -content_type  ${:object_type}  -supertype     ${:supertype}  -pretty_name   ${:pretty_name}  -pretty_plural ${:pretty_plural}  -table_name    ${:table_name}  -id_column     ${:id_column}  -name_method   ${:name_method}

  :folder_type register
}
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: