broadleaf:
catalog:
metadata:
product-business-type-route-component-keys:
- catalog:products:${typeKey}:create
- catalog:products:${typeKey}:update
Tip
|
The 2.x versions are Spring Boot 3 compatible. |
JDK 17 is required for Broadleaf release trains 2.0.0-GA, and beyond.
This version now requires DataTracking 2.0.3+
This version is required by SearchService 2.1.5+ documented in the 2.1.5 Search Release Notes
Important
|
Also see changes made in Admin Metadata Services 2.1.4 |
Instead of being hardcoded as part of the BusinessType metadata, the BusinessTypeFields
metadataMappings
are now derived from a property: broadleaf.catalog.metadata.product-business-type-route-component-keys
.
broadleaf:
catalog:
metadata:
product-business-type-route-component-keys:
- catalog:products:${typeKey}:create
- catalog:products:${typeKey}:update
This is to make indexing the necessary information about merchandising product items easier by consolidating the key information about the required add-on ProductOptions into a single structure. More details in Catalog Search Integrations, particularly ConsolidatedProduct#requiredOptionInfo and RequiredOptionInfoProductConsolidationContributor.
This uses a new ProductConsolidationContributor
, RequiredOptionInfoProductConsolidationContributor
, that replaces ItemChoiceAvailabilityConsolidationContributor
.
It does the same availability checks for IncludedProducts and ItemChoice ProductOptions as well consolidate the rest of the information for required ProductOptions that might relate to pricing.
This new class was used due to the number of changes required to adequately and efficiently hydrate the related Products and Variants onto the ItemChoices.
Tip
|
To turn off the new contributor and re-enable the old contributor, users can set
|
Note
|
Also changed ProductDetails hydration so that the ItemChoice#defaultProductInCategory is always hydrated even if the request specifies to not hydrate the category products to allow pricing to work correctly for merchandising products.
The non-default products will continue to not be hydrated unless the request specifies to do so.
|
The original issue: certain repository methods could produce very large result sets, which would internally break the narrowing and join flows and cause the operation to fail.
For example, if an entity has been extended, then after the initial query against the base BLC table, Hibernate does an additional query against the extension table using an IN
criteria containing each ID from the base result set.
If the base result set is too large, then the IN
clause may exceed query size limits imposed by DB platforms.
The repository methods identified as being susceptible to this problem have been given new custom implementations that collect the results in batches before returning to the caller.
The general pattern of changes is like so:
The affected repository method signature is migrated from the main *Repository
interface into a parent Customized*Repository
interface.
This is backwards compatible, as the customized repository interfaces are always parents of the main interfaces. Thus, the methods will still be available to components that are injecting the repository bean.
In the JpaCustomized*Repository
class, the method is implemented in a way that gathers results in batches.
Configuration properties are introduced which allow clients to customize the internal batch sizes for each method implementation.
Here is a list of affected repositories and repository methods:
ProductTagRepository
Please see the Product Tag repository configuration properties documentation
Updated methods
findAllByProductContextIdIn
findAllByProductContextIdInAndTagContextIdIn
findAllByProductContextId
findAllByProductContextIdAndVariantIdIsNull
findAllByTagContextIdIn
PromotionalCategoryProductRepository
Please see the Promotional Category Product repository configuration properties documentation
Updated methods
findAllByPromotionalProductContextIdIn
findAllByCategoryContextIdIn
PromotionalProductRepository
Please see the Promotional Product repository configuration properties documentation
Updated methods
findAllByProductContextIdIn
CategoryProductRepository
Please see the Category Product repository configuration properties documentation
Updated methods
findAllByCategoryContextIdIn
CategoryAssetRepository
Please see the Category Asset repository configuration properties documentation
Updated methods
findAllByCategoryContextIdIn
CategoryRepository
Please see the Category repository configuration properties documentation
Updated methods
findAllByParentCategoryContextId
OptionTemplateRepository
Note
|
As there was no pre-existing CustomizedOptionTemplateRepository interface or implementation, it was newly introduced as part of this effort.
|
Please see the Option Template repository configuration properties documentation
Updated methods
findAllByCategoryContextIdIn
Note
|
This change is important to fix issues with the Solr search narrowing. |
The ConsolidatedProduct domain has been updated to contain a few new fields which are utilized in the Solr search process. These fields have been added to aid in narrowing of results. See the 2.1.5 Search Release Notes for the updates made on search.
creatingApplicationId
Contains the ID of the application which owns the Product, if it exists. This will be null when a Product is created at the Tenant level.
This value is designed to be the same as the value in Tracking.creatingApplicationId
.
sandboxAwareCatalogOverrides
Contains Catalog override ids with additional Sandbox information encoded to aid with narrowing products that are both Sandbox and Catalog discriminated.
catalogAwareSandboxOverrides
Contains Sandbox override ids with additional Catalog information encoded to aid with narrowing products that are both Sandbox and Catalog discriminated.
Update DefaultConsolidatedProductPostProcessor
and DefaultProductConsolidationService
with changes to populate the above fields added onto ConsolidatedProduct
.
The method signature of DefaultProductConsolidationService#createPostProcessor
was updated as a part of this change, so clients who have overridden this method or are directly referencing it will need to update their references to match the new signature.
Update ProductConsolidationUtil
to fix a bug where a null
author could be passed or an incorrect author if a record contained changes from multiple authors.
Updated the Javadocs within ConsolidatedProduct
and DefaultConsolidatedProductPostProcessor
to more accurately and clearly describe some of the existing and new functionality.
Fixed an issue where after updating the maxConfigurableProductDepth property, any fetch information requests about a product that doesn’t have any addOns can lead to an error.
Bundle Item availability during Product consolidation for search indexing not really considering different sandbox versions for the consolidated products in question.
Fixed not indexing the priceWithDependentItems
for Merchandising products.
Previously, users were able to change the Option Type of an Option Template even after the template had been saved. This could lead to inconsistencies and unexpected behavior. The application now disallows updates to the Option Type once an Option Template has been saved.
Fixed that a product is not visible on storefront when there is a difference in product’s category hierarchy in application level vs tenant
Make option template’s allowed values grid orderable with drag’n’drop, also make option template’s allowed values grid column displayOrder readonly