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

Unknown column sku in field list #2016

Open
dualklip opened this issue Nov 12, 2024 · 0 comments
Open

Unknown column sku in field list #2016

dualklip opened this issue Nov 12, 2024 · 0 comments
Labels
bug Something isn't working unconfirmed

Comments

@dualklip
Copy link
Contributor

  • Lunar version: 1.x

In the Full Example of how to create a product (https://docs.lunarphp.io/core/reference/products.html#full-example) there is a reference to a field which should no longer be there because it causes an error. Is the sku field:

Lunar\Models\Product::create([
    'product_type_id' => $productType->id,
    'status' => 'published',
    'brand_id' => $brandId,
    'sku' => 'DRBOOT',
    'attribute_data' => [
        'name' => new TranslatedText(collect([
            'en' => new Text('1460 PATENT LEATHER BOOTS'),
        ])),
        'description' => new Text('Even more shades from our archive...'),
    ],
]);
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'sku' in 'field list' ...

I can make a MR with the change but first I need confirmation of this iisue and second I'm not pretty sure if a have to do the MR to the v1-docs branch or 1.x.

The documentation say this:

For documentation of new features in an upcoming release, target the main branch.
https://docs.lunarphp.io/core/contributing.html#documentation-updates

@dualklip dualklip added bug Something isn't working unconfirmed labels Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unconfirmed
Projects
None yet
Development

No branches or pull requests

1 participant