Page 1 of 1

Limiting Sku Queries

Posted: Wed Dec 03, 2014 2:39 pm
by EcommerceDeveloper
I currently am working with on an implementation of Broadleaf that extends the sku entity. Its extend so that a foreign key could be added to the sku that references are existing product table in our database used by in our store POS systems. Currently I am running into an issue where if the record is deleted from existing products table I'm getting a entity not found exception thanks to hibernate looking for the object and it no longer being there. I'd like to change skus so whenver a sku is queried, if the foreign key relationship is null (not the field, but it can't find the object based on the field) that the sku isn't even queried. What would be the best way to do this?