Aimeos 2021.07 database transaction
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!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Aimeos 2021.07 database transaction
How to do database transaction in Aimeos 2021.07 ? I have a code:
Database manager have below methods:
Code: Select all
$orderCntl = \Aimeos\Controller\Frontend::create($this->context, 'order' );
$basketCntl = \Aimeos\Controller\Frontend::create($this->context, 'basket' );
$this->setAddress($req);
$basket = $basketCntl->store();
//begin transaction
$orderItem = $orderCntl->add($basket->getId(), ['order.type' => 'web'])->store();
.......
//commit transaction
........
........
//rollback
Code: Select all
array:6 [▼
0 => "__construct"
1 => "__destruct"
2 => "__clone"
3 => "__sleep"
4 => "acquire"
5 => "release"
]
Re: Aimeos 2021.07 database transaction
Please update to 2021.10 LTS as 2021.07 and before isn't supported any more.
The controllers don't have methods for begin/commit/rollback transactions because they use them internally if required, only the managers have, e.g.:
The controllers don't have methods for begin/commit/rollback transactions because they use them internally if required, only the managers have, e.g.:
Code: Select all
$manager = \Aimeos\MShop::create( $context, 'order' );
$manager->begin();
try {
// ...
$manager->commit();
} catch( \Exception $e ) {
$manager->rollback();
}
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Aimeos 2021.07 database transaction
What exact steps do I need to follow outside of composer to upgrade from 2021.07 to 2021.10?
How big are the differences between 2021.07 and 2021.10 ?
How big are the differences between 2021.07 and 2021.10 ?
Re: Aimeos 2021.07 database transaction
After composer update to 2021.10 version when I execute below command:
I receive error:
Code: Select all
php artisan aimeos:setup
Code: Select all
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'statuspayment' in 'where clause': UPDATE "mshop_order_base_product" SET "statuspayment" = -1 WHERE "statuspayment" IS NULL
Re: Aimeos 2021.07 database transaction
Seems to be a dependency issue. Can you please execute this command and try again:
Code: Select all
composer req aimeos/aimeos-core:2021.10.x-dev
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Aimeos 2021.07 database transaction
It's working but now I use:
and
Maybe I should update aimeos/aimeos-laravel to version 2021.10.x-dev as well ?
Code: Select all
"aimeos/aimeos-laravel": "2021.10.6"
Code: Select all
"aimeos/aimeos-core": "2021.10.x-dev"
Re: Aimeos 2021.07 database transaction
No, the .x-dev versions only contain non-tagged commits that will be available for all users as soon as a new version gets tagged. It's only for testing bugfixes.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Aimeos 2021.07 database transaction
So when will the release of the new version 2021.10 with these fixes be?
Re: Aimeos 2021.07 database transaction
New minor releases should be available tomorrow.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star