Assuming you've already fetched the product entity and trying to get subProduct entity Type:
are we talking M:N or M:1 relationship? If the former, I'd think you could prefetch the relationship table (subProductsInProducts tbl) and include a productType column. (Which I'll assume you will use as a discriminator for your sub Types)
If the latter, then I guess you could place the productType column onto the product table.
Could you perhaps explain in more detail what you are looking to do?
Thanks,