Hello,
It's been a while since I've posted but I've been happily using RedBeanPHP without many issues. However now I've come across a problem that I can't seem to be able to fix myself. I'm using the version 3.5.13.
I have product beans that need to have a reference to other product beans. I've used sharedProduct for this, and it has seemed to work fine. As expected, the link table is called 'product_product' in this case.
Now I ran into a situation where I need to add a qualifier for this relationship. When trying this, I was unable to access the link beans with the ownProductProduct syntax. So I figured I'd use a different link table name to see if it helps.
I tried creating the relations with $product->via('linkedproduct', array(type => $type))->product but this didn't seem to create a proper table. Changing it to $product->via('linkedproduct', array(type => $type))->linkedproduct works.
However with the latter version I am unable to fetch the actual linked products. I can load the link beans just fine, but I can't get a list of the shared linked products - I guess this due to the fact that RedBeanPHP doesn't know which table to use to resolve the linkedproduct_id in the link table.
There are a bunch of alias, fetchAs, etc. functions but I haven't been able to find a combination that would resolve this.
Help?