Add join table for product and sub_product relation, complete writing licence_spec tests, added guard