I have written a new version of intranet-dynfields (or AMS), which combines the ::xo::db::Class and ::xo::db::Object Classes with extension tables (if you use acs_object_type_tables properly) along with relationships (where relationships can have attributes).
This is combined with Element and Form Classes, allowing you to write your form like:
=========
set party [::im::dynfield::Class get_instance_from_db -id $party_id]
set form [::im::dynfield::Form create ::im_company_form -class "$class" -list_ids $list_ids -name "party_ae" -data $party -key "party_id"
-submit_link "/intranet-contacts/contact"]
$form generate -export [list [list object_type [$party object_type]] [list rel_type $rel_type] [list object_id_two $object_id_two] [list
role_two $role_two]]
========
I can go into more details if anyone wants, especially how this meta model allows you to dynamically extend acs_object_types with additional attributes and associate widgets with them, reducing the need for writing ad_form to a less than bare minimum. Obviously it allows you to change the datamodel of an object_type 😊.