Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error importing document: Field itemStocks not found. #68

Open
Rasimoghlu opened this issue May 6, 2023 · 2 comments
Open

Error importing document: Field itemStocks not found. #68

Rasimoghlu opened this issue May 6, 2023 · 2 comments

Comments

@Rasimoghlu
Copy link

if ($this->itemStocks->isNotEmpty()) {
$extraFields['itemStocks'] = $this->itemStocks->map(function ($itemStock) {
return [
'available' => (int)$itemStock->available,
'stock_unit_code' => (string)$itemStock->stock_unit_code,
'source_warehouse_id' => (int)$itemStock->source_warehouse_id
];
})->toArray();
}

When im trying to import object like this i get error Error importing document: Field itemStocks not found.

How to fix it? I declared itemStocks in schema and gived type object[]

@karakhanyans
Copy link
Collaborator

Hi @Rasimoghlu

Thanks for reporting this issue, we will prioritise it and solve.

@karakhanyans
Copy link
Collaborator

@Rasimoghlu we are working on this bug you reported: https://stackoverflow.com/questions/76198963/how-to-filter-in-typesensne-collection-of-objects-in-laravel

Could you please share with us your getCollectionSchema and the version of the package that you are using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants