feat: preload additional related entities in GetById method of InventoryMovementRepository
Deploy Application / deploy (push) Successful in 19s
Details
Deploy Application / deploy (push) Successful in 19s
Details
This commit is contained in:
parent
7adb6a433a
commit
111d0cffa3
|
|
@ -41,6 +41,12 @@ func (r *inventoryMovementRepository) GetById(ctx context.Context, tx *gorm.DB,
|
|||
var movement entities.TInventoryMovementEntity
|
||||
if err := tx.WithContext(ctx).
|
||||
Preload("Client").
|
||||
Preload("SourceLocation").
|
||||
Preload("DestinationLocation").
|
||||
Preload("SourceZone").
|
||||
Preload("DestinationZone").
|
||||
Preload("SourceAisle").
|
||||
Preload("DestinationAisle").
|
||||
First(&movement, "id = ?", id).Error; err != nil {
|
||||
return movement, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue