feat: enhance GetAllByReturnId method to preload Product.Uom along with related entities
Deploy Application / deploy (push) Successful in 19s
Details
Deploy Application / deploy (push) Successful in 19s
Details
This commit is contained in:
parent
cb85352475
commit
360db2526b
|
|
@ -48,6 +48,7 @@ func (r *inventoryReturnLineRepository) GetAllByReturnId(ctx context.Context, re
|
||||||
var lines []entities.TInventoryReturnLineEntity
|
var lines []entities.TInventoryReturnLineEntity
|
||||||
if err := r.db.WithContext(ctx).Where("inv_return_id = ?", returnId).
|
if err := r.db.WithContext(ctx).Where("inv_return_id = ?", returnId).
|
||||||
Preload("Product").
|
Preload("Product").
|
||||||
|
Preload("Product.Uom").
|
||||||
Preload("InvReturn").
|
Preload("InvReturn").
|
||||||
Preload("Client").
|
Preload("Client").
|
||||||
Find(&lines).Error; err != nil {
|
Find(&lines).Error; err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue