Unable to create new listing and add/edit page for a newly added table?

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
shainanand
Posts: 26
Joined: 16 Oct 2023, 15:05

Unable to create new listing and add/edit page for a newly added table?

Post by shainanand » 03 Jan 2024, 13:29

Hi, I have a new table mshop_taxcode. So I created the class files like below and made changes accordingly (I tried to replicate mshop_service)

packages\npk\src\MShop\Taxcode\Exception.php
packages\npk\src\MShop\Taxcode\Item\Iface.php
packages\npk\src\MShop\Taxcode\Item\Standard.php
packages\npk\src\MShop\Taxcode\Manager\Base.php
packages\npk\src\MShop\Taxcode\Manager\Iface.php
packages\npk\src\Mshop\Taxcode\Manager\Standard.php

So when go to listing page, I am getting this error. Any idea what this could be?

Aimeos\Base\DB\Exception {#1578 ▼ // packages\npk\src\Admin\JQAdm\Base.php:745
#message: """
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'mtax.id' in 'order clause':
\t\t\t\tSELECT "id", "siteid", "ctime", "mtime", "editor"
\t\t\t\tFROM "mshop_taxcode"
\t\t\t\t
\t\t\t\tWHERE 1 = 1
\t\t\t\tGROUP BY mtax."id", "id"
\t\t\t\tORDER BY mtax."id" ASC
\t\t\t\tLIMIT 25 OFFSET 0
\t\t\t

User avatar
aimeos
Administrator
Posts: 7894
Joined: 01 Jan 1970, 00:00

Re: Unable to create new listing and add/edit page for a newly added table?

Post by aimeos » 04 Jan 2024, 08:36

It needs to be

Code: Select all

FROM "mshop_taxcode" AS mtax
In the latest version, you can create managers much easier:
https://aimeos.org/docs/latest/models/create-managers/
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply