#***********************************************
# makes an entity from an element
# used in field, index, constraint to make entity
#**********************************************
proc dict::mk_entity {element} {
  upvar #0 $element data
  set ent_id [$element attr I_ENTITY]
  if {[info globals [lindex [entityClass::prefix] 0]$ent_id] == ""} {
   set entity [get_ent $ent_id]
   return [list_table $entity [lindex [entityClass::prefix] 0] entity dict]
 }
 return [lindex [entityClass::prefix] 0]$ent_id
}
