Midcom searches classes without querying the class definitions
For example after get_parent is called, midcom translates the given mgd_schema to a component, from which it gets the class name, so net_nehmer_discussion_post will result in net.nehmer.discussion and it will search the class definition there, result: net_nehmer_discussion_post_dba.
The behavoir could be that the component my.fork.discussion uses the net_nehmer_discussion_post mgdschema with class definition: my_fork_discussion_post_dba, but since the mgdschema is translated, net.nehmer.discussion will be searched for class definitions and will return net_nehmer_discussion_post_dba instead my_fork_discussion_post_dba.
Only this function is used for search for possible component names:
dbclassloader.php > get_component_for_class()
It should also verify the class definitions from the active plugin from where get_parent is called. So it should ask for the topics component instead.
<redtr> bergie? do you know midcom cores components good?
<@bergie> redtr: sure, what is your question?
<redtr> i made a fork out of n.n.discussion and renamed the classes to the new components name. m.t.discussion, but i kept the mgd_schema name n_n_discussion_post / thread and set class definition to m_t_discussion_post _dba / thread_dba. But midcom doesn't use the class definition and translates n_n_d_post to n.n.discussion component
<@bergie> redtr: did you see how n.n.wiki does that?
<redtr> bergie: yes it extends the midcom_db_article, but the wiki always uses the constructor with an id. So that works, since you use the class itself and give it an id to fill. The same problem there will occur if you call get_parent(). it will return midcom_db_article instead n.n.wiki.wikipage
<@bergie> ah, I see
<@bergie> that is a reflector issue then I think
<@bergie> can you post a ticket on trac?
<@bergie> the heuristics there need to figure out which of the inherited DBA classes should be used
<redtr> bergie: dbclassloader.php calls get_component_for_class() which only translates the mgdschema name and doesn't search the classdefinitions
<redtr> bergie: will do
<@bergie> redtr: yep, sounds like the issue indeed