Default-product set failed — HQL bulk UPDATE disallows the vendor→org join

FixSecurityService
Shipped
July 5, 2026 at 11:24 PM UTC
Author
Kamo
Commit
d544a3f

setDefault used a bulk 'update LeadVendorProduct ... where p.vendor.id in (subquery)' — Hibernate bulk updates reject the implicit association join, so the call threw (surfaced as 'Failed to set default product'). Rewrite as SELECT (the proven resolveDefaultProduct pattern) + entity saves; single-active means at most one row to demote.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing