hello, I'm working on a mvc comoponent on Joomla 4.
I need to generate new child items when i genertate the father.
I'm at postsavehook and at joomla 3 I did somethjing like this
foreach ($list_of_childs as $child_id) {
JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_mycomponent/table');
$child= JTable::getInstance('child ', 'Table', array());
$child->load(
$child_id);
....
}
but mow getInstance is deprecated and i need to use Factory, but evertithing i've tried do
do finis in a server error or load on bool.
Any ideas?
I know i can do it direct with Factory::getDbo(); and qyeris, but the idea of use bind, store, load, ... etc from table it was great.
Thanks