-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
cycle\ORM\Exception\TransactionException Transaction can't be finished. Some relations can't be resolved: Update product
- tax_rate (Cycle\ORM\Relation\BelongsTo)🐛
#348
Comments
product
- tax_rate (Cycle\ORM\Relation\BelongsTo)🐛 product
- tax_rate (Cycle\ORM\Relation\BelongsTo)🐛
Hello.
Can you update the orm to v2.1.1? |
About BelongsTo relation: |
Hi Aleksei,
I have had a look at #347.
Here is my stack trace.
```
Cycle\ORM\Exception\TransactionException: Transaction can't be finished. Some relations can't be resolved:
Update `product`
- family (Cycle\ORM\Relation\BelongsTo) in /var/www/html/yii-invoice/vendor/cycle/orm/src/Exception/TransactionException.php:40
Stack trace:
#0 /var/www/html/yii-invoice/vendor/cycle/orm/src/Transaction/UnitOfWork.php(104): Cycle\ORM\Exception\TransactionException::unresolvedRelations()
#1 /var/www/html/yii-invoice/vendor/cycle/orm/src/EntityManager.php(47): Cycle\ORM\Transaction\UnitOfWork->run()
#2 /var/www/html/yii-invoice/vendor/yiisoft/yii-cycle/src/Data/Writer/EntityWriter.php(25): Cycle\ORM\EntityManager->run()
#3 /var/www/html/yii-invoice/src/Invoice/Product/ProductRepository.php(59): Yiisoft\Yii\Cycle\Data\Writer\EntityWriter->write()
#4 /var/www/html/yii-invoice/src/Invoice/Product/ProductService.php(30): App\Invoice\Product\ProductRepository->save()
#5 /var/www/html/yii-invoice/src/Invoice/Product/ProductController.php(244): App\Invoice\Product\ProductService->saveProduct()
#6 [internal function]: App\Invoice\Product\ProductController->edit()
#7 /var/www/html/yii-invoice/vendor/yiisoft/injector/src/Injector.php(66): ReflectionFunction->invokeArgs()
#8 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareFactory.php(89): Yiisoft\Injector\Injector->invoke()
#9 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(104): ***@***.***>process()
#10 /var/www/html/yii-invoice/vendor/yiisoft/auth/src/Middleware/Authentication.php(57): ***@***.***>handle()
#11 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(104): Yiisoft\Auth\Middleware\Authentication->process()
#12 /var/www/html/yii-invoice/src/Middleware/AccessChecker.php(39): ***@***.***>handle()
#13 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareFactory.php(126): App\Middleware\AccessChecker->process()
#14 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(104): ***@***.***>process()
#15 /var/www/html/yii-invoice/vendor/yiisoft/yii-debug-viewer/src/Middleware/ToolbarMiddleware.php(33): ***@***.***>handle()
#16 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(104): Yiisoft\Yii\Debug\Viewer\Middleware\ToolbarMiddleware->process()
#17 /var/www/html/yii-invoice/vendor/yiisoft/data-response/src/Middleware/FormatDataResponse.php(29): ***@***.***>handle()
#18 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(104): Yiisoft\DataResponse\Middleware\FormatDataResponse->process()
#19 /var/www/html/yii-invoice/vendor/yiisoft/csrf/src/CsrfMiddleware.php(48): ***@***.***>handle()
#20 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(104): Yiisoft\Csrf\CsrfMiddleware->process()
#21 /var/www/html/yii-invoice/vendor/yiisoft/yii-debug-api/src/Middleware/DebugHeaders.php(31): ***@***.***>handle()
#22 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(104): Yiisoft\Yii\Debug\Api\Middleware\DebugHeaders->process()
#23 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(53): ***@***.***>handle()
#24 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareDispatcher.php(50): Yiisoft\Middleware\Dispatcher\MiddlewareStack->handle()
#25 /var/www/html/yii-invoice/vendor/yiisoft/router/src/MatchingResult.php(116): Yiisoft\Middleware\Dispatcher\MiddlewareDispatcher->dispatch()
#26 /var/www/html/yii-invoice/vendor/yiisoft/router/src/Middleware/Router.php(61): Yiisoft\Router\MatchingResult->process()
#27 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(104): Yiisoft\Router\Middleware\Router->process()
#28 /var/www/html/yii-invoice/src/Middleware/LocaleMiddleware.php(95): ***@***.***>handle()
#29 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(104): App\Middleware\LocaleMiddleware->process()
#30 /var/www/html/yii-invoice/vendor/yiisoft/user/src/Login/Cookie/CookieLoginMiddleware.php(71): ***@***.***>handle()
#31 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(104): Yiisoft\User\Login\Cookie\CookieLoginMiddleware->process()
#32 /var/www/html/yii-invoice/vendor/yiisoft/cookies/src/CookieMiddleware.php(84): ***@***.***>handle()
#33 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(104): Yiisoft\Cookies\CookieMiddleware->process()
#34 /var/www/html/yii-invoice/vendor/yiisoft/session/src/SessionMiddleware.php(36): ***@***.***>handle()
#35 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(104): Yiisoft\Session\SessionMiddleware->process()
#36 /var/www/html/yii-invoice/vendor/yiisoft/error-handler/src/Middleware/ErrorCatcher.php(135): ***@***.***>handle()
#37 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(104): Yiisoft\ErrorHandler\Middleware\ErrorCatcher->process()
#38 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(53): ***@***.***>handle()
#39 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareDispatcher.php(50): Yiisoft\Middleware\Dispatcher\MiddlewareStack->handle()
#40 /var/www/html/yii-invoice/vendor/yiisoft/yii-http/src/Application.php(87): Yiisoft\Middleware\Dispatcher\MiddlewareDispatcher->dispatch()
#41 /var/www/html/yii-invoice/vendor/yiisoft/yii-runner-http/src/HttpApplicationRunner.php(105): Yiisoft\Yii\Http\Application->handle()
#42 /var/www/html/yii-invoice/public/index.php(36): Yiisoft\Yii\Runner\Http\HttpApplicationRunner->run()
#43 {main}
```
My repo is publicly available at github.com/rossaddison/yii-invoice if you want to set it up.
…________________________________
From: Aleksei Gagarin ***@***.***>
Sent: 21 June 2022 16:28
To: cycle/orm ***@***.***>
Cc: Ross Addison ***@***.***>; Author ***@***.***>
Subject: Re: [cycle/orm] cycle\ORM\Exception\TransactionException Transaction can't be finished. Some relations can't be resolved: Update `product` - tax_rate (Cycle\ORM\Relation\BelongsTo)🐛 (Issue #348)
About BelongsTo relation:
Can you check that PR is about your issue? #347<#347>
—
Reply to this email directly, view it on GitHub<#348 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACBERY536QCR4ZRTFDUZHGDVQHNQ3ANCNFSM5ZMKPQZQ>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
[cid:e78b8164-f878-43ad-a55a-574724011f87]
composer.json
"require": {
"php": "^8.0",
"ext-mbstring": "*",
"ext-pdo_sqlite": "*",
"cebe/markdown": ***@***.***",
"cycle/database": "^2.0",
"cycle/entity-behavior": "^1.0",
"cycle/orm": "^2.1.1",
"doctrine/collections": "^1.6",
"fakerphp/faker": "^1.14",
"httpsoft/http-message": "^1.0.5",
"mpdf/mpdf": "*",
…________________________________
From: Ross Addison ***@***.***>
Sent: 21 June 2022 18:16
To: cycle/orm ***@***.***>
Subject: Re: [cycle/orm] cycle\ORM\Exception\TransactionException Transaction can't be finished. Some relations can't be resolved: Update `product` - tax_rate (Cycle\ORM\Relation\BelongsTo)🐛 (Issue #348)
Hi Aleksei,
I have had a look at #347.
Here is my stack trace.
Cycle\ORM\Exception\TransactionException: Transaction can't be finished. Some relations can't be resolved:
Update `product`
- family (Cycle\ORM\Relation\BelongsTo) in /var/www/html/yii-invoice/vendor/cycle/orm/src/Exception/TransactionException.php:40
Stack trace:
#0 /var/www/html/yii-invoice/vendor/cycle/orm/src/Transaction/UnitOfWork.php(104): Cycle\ORM\Exception\TransactionException::unresolvedRelations()
#1 /var/www/html/yii-invoice/vendor/cycle/orm/src/EntityManager.php(47): Cycle\ORM\Transaction\UnitOfWork->run()
#2 /var/www/html/yii-invoice/vendor/yiisoft/yii-cycle/src/Data/Writer/EntityWriter.php(25): Cycle\ORM\EntityManager->run()
#3 /var/www/html/yii-invoice/src/Invoice/Product/ProductRepository.php(59): Yiisoft\Yii\Cycle\Data\Writer\EntityWriter->write()
#4 /var/www/html/yii-invoice/src/Invoice/Product/ProductService.php(30): App\Invoice\Product\ProductRepository->save()
#5 /var/www/html/yii-invoice/src/Invoice/Product/ProductController.php(244): App\Invoice\Product\ProductService->saveProduct()
#6 [internal function]: App\Invoice\Product\ProductController->edit()
#7 /var/www/html/yii-invoice/vendor/yiisoft/injector/src/Injector.php(66): ReflectionFunction->invokeArgs()
#8 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareFactory.php(89): Yiisoft\Injector\Injector->invoke()
#9 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(104): ***@***.***>process()
#10 /var/www/html/yii-invoice/vendor/yiisoft/auth/src/Middleware/Authentication.php(57): ***@***.***>handle()
#11 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(104): Yiisoft\Auth\Middleware\Authentication->process()
#12 /var/www/html/yii-invoice/src/Middleware/AccessChecker.php(39): ***@***.***>handle()
#13 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareFactory.php(126): App\Middleware\AccessChecker->process()
#14 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(104): ***@***.***>process()
#15 /var/www/html/yii-invoice/vendor/yiisoft/yii-debug-viewer/src/Middleware/ToolbarMiddleware.php(33): ***@***.***>handle()
#16 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(104): Yiisoft\Yii\Debug\Viewer\Middleware\ToolbarMiddleware->process()
#17 /var/www/html/yii-invoice/vendor/yiisoft/data-response/src/Middleware/FormatDataResponse.php(29): ***@***.***>handle()
#18 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(104): Yiisoft\DataResponse\Middleware\FormatDataResponse->process()
#19 /var/www/html/yii-invoice/vendor/yiisoft/csrf/src/CsrfMiddleware.php(48): ***@***.***>handle()
#20 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(104): Yiisoft\Csrf\CsrfMiddleware->process()
#21 /var/www/html/yii-invoice/vendor/yiisoft/yii-debug-api/src/Middleware/DebugHeaders.php(31): ***@***.***>handle()
#22 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(104): Yiisoft\Yii\Debug\Api\Middleware\DebugHeaders->process()
#23 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(53): ***@***.***>handle()
#24 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareDispatcher.php(50): Yiisoft\Middleware\Dispatcher\MiddlewareStack->handle()
#25 /var/www/html/yii-invoice/vendor/yiisoft/router/src/MatchingResult.php(116): Yiisoft\Middleware\Dispatcher\MiddlewareDispatcher->dispatch()
#26 /var/www/html/yii-invoice/vendor/yiisoft/router/src/Middleware/Router.php(61): Yiisoft\Router\MatchingResult->process()
#27 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(104): Yiisoft\Router\Middleware\Router->process()
#28 /var/www/html/yii-invoice/src/Middleware/LocaleMiddleware.php(95): ***@***.***>handle()
#29 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(104): App\Middleware\LocaleMiddleware->process()
#30 /var/www/html/yii-invoice/vendor/yiisoft/user/src/Login/Cookie/CookieLoginMiddleware.php(71): ***@***.***>handle()
#31 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(104): Yiisoft\User\Login\Cookie\CookieLoginMiddleware->process()
#32 /var/www/html/yii-invoice/vendor/yiisoft/cookies/src/CookieMiddleware.php(84): ***@***.***>handle()
#33 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(104): Yiisoft\Cookies\CookieMiddleware->process()
#34 /var/www/html/yii-invoice/vendor/yiisoft/session/src/SessionMiddleware.php(36): ***@***.***>handle()
#35 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(104): Yiisoft\Session\SessionMiddleware->process()
#36 /var/www/html/yii-invoice/vendor/yiisoft/error-handler/src/Middleware/ErrorCatcher.php(135): ***@***.***>handle()
#37 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(104): Yiisoft\ErrorHandler\Middleware\ErrorCatcher->process()
#38 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(53): ***@***.***>handle()
#39 /var/www/html/yii-invoice/vendor/yiisoft/middleware-dispatcher/src/MiddlewareDispatcher.php(50): Yiisoft\Middleware\Dispatcher\MiddlewareStack->handle()
#40 /var/www/html/yii-invoice/vendor/yiisoft/yii-http/src/Application.php(87): Yiisoft\Middleware\Dispatcher\MiddlewareDispatcher->dispatch()
#41 /var/www/html/yii-invoice/vendor/yiisoft/yii-runner-http/src/HttpApplicationRunner.php(105): Yiisoft\Yii\Http\Application->handle()
#42 /var/www/html/yii-invoice/public/index.php(36): Yiisoft\Yii\Runner\Http\HttpApplicationRunner->run()
#43 {main}
My repo is publicly available at github.com/rossaddison/yii-invoice if you want to set it up.
________________________________
From: Aleksei Gagarin ***@***.***>
Sent: 21 June 2022 16:28
To: cycle/orm ***@***.***>
Cc: Ross Addison ***@***.***>; Author ***@***.***>
Subject: Re: [cycle/orm] cycle\ORM\Exception\TransactionException Transaction can't be finished. Some relations can't be resolved: Update `product` - tax_rate (Cycle\ORM\Relation\BelongsTo)🐛 (Issue #348)
About BelongsTo relation:
Can you check that PR is about your issue? #347<#347>
—
Reply to this email directly, view it on GitHub<#348 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACBERY536QCR4ZRTFDUZHGDVQHNQ3ANCNFSM5ZMKPQZQ>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Could you render the ORM Schema in a PHP format and show here? |
public function setTax_rate( $tax_rate ): void do you have the code |
This is the _form:
|
This is the controller:
|
This is the service:
|
This is the Form code:
|
How do you render the Orm schema? |
You can use https://github.com/cycle/schema-renderer for schema rendering |
https://github.com/yiisoft/yii-cycle/blob/master/docs/en/console-commands.md#common
|
Schema php <?php
declare(strict_types=1);
use Cycle\ORM\Relation;
use Cycle\ORM\SchemaInterface as Schema;
return [
'identity' => [
Schema::ENTITY => 'App\\Auth\\Identity',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Auth\\IdentityRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'identity',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'authKey' => 'auth_key',
'user_id' => 'user_id',
],
Schema::RELATIONS => [
'user' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'user',
Relation::LOAD => Relation::LOAD_EAGER,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'user_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'user_id' => 'int',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'comment' => [
Schema::ENTITY => 'App\\Blog\\Entity\\Comment',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Blog\\Comment\\CommentRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'comment',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'public' => 'public',
'content' => 'content',
'created_at' => 'created_at',
'updated_at' => 'updated_at',
'published_at' => 'published_at',
'deleted_at' => 'deleted_at',
'user_id' => 'user_id',
'post_id' => 'post_id',
],
Schema::RELATIONS => [
'user' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'user',
Relation::LOAD => Relation::LOAD_EAGER,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'user_id',
Relation::OUTER_KEY => ['id'],
],
],
'post' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'post',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'post_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => 'App\\Blog\\Comment\\Scope\\PublicScope',
Schema::TYPECAST => [
'id' => 'int',
'public' => 'bool',
'created_at' => 'datetime',
'updated_at' => 'datetime',
'published_at' => 'datetime',
'deleted_at' => 'datetime',
'user_id' => 'int',
'post_id' => 'int',
],
Schema::SCHEMA => [],
Schema::LISTENERS => [
[
'Cycle\\ORM\\Entity\\Behavior\\Listener\\CreatedAt',
[
'field' => 'created_at',
],
],
[
'Cycle\\ORM\\Entity\\Behavior\\Listener\\UpdatedAt',
[
'field' => 'updated_at',
'nullable' => false,
],
],
[
'Cycle\\ORM\\Entity\\Behavior\\Listener\\SoftDelete',
[
'field' => 'deleted_at',
],
],
],
Schema::TYPECAST_HANDLER => null,
],
'post' => [
Schema::ENTITY => 'App\\Blog\\Entity\\Post',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Blog\\Post\\PostRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'post',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'slug' => 'slug',
'title' => 'title',
'public' => 'public',
'content' => 'content',
'created_at' => 'created_at',
'updated_at' => 'updated_at',
'published_at' => 'published_at',
'deleted_at' => 'deleted_at',
'user_id' => 'user_id',
],
Schema::RELATIONS => [
'user' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'user',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'user_id',
Relation::OUTER_KEY => ['id'],
],
],
'tags' => [
Relation::TYPE => Relation::MANY_TO_MANY,
Relation::TARGET => 'tag',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::WHERE => [],
Relation::ORDER_BY => [],
Relation::INNER_KEY => ['id'],
Relation::OUTER_KEY => ['id'],
Relation::THROUGH_ENTITY => 'postTag',
Relation::THROUGH_INNER_KEY => 'post_id',
Relation::THROUGH_OUTER_KEY => 'tag_id',
Relation::THROUGH_WHERE => [],
'4' => null,
],
],
'comments' => [
Relation::TYPE => Relation::HAS_MANY,
Relation::TARGET => 'comment',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::WHERE => [],
Relation::ORDER_BY => [],
Relation::INNER_KEY => ['id'],
Relation::OUTER_KEY => 'post_id',
'4' => null,
],
],
],
Schema::SCOPE => 'App\\Blog\\Post\\Scope\\PublicScope',
Schema::TYPECAST => [
'id' => 'int',
'public' => 'bool',
'created_at' => 'datetime',
'updated_at' => 'datetime',
'published_at' => 'datetime',
'deleted_at' => 'datetime',
'user_id' => 'int',
],
Schema::SCHEMA => [],
Schema::LISTENERS => [
[
'Cycle\\ORM\\Entity\\Behavior\\Listener\\CreatedAt',
[
'field' => 'created_at',
],
],
[
'Cycle\\ORM\\Entity\\Behavior\\Listener\\UpdatedAt',
[
'field' => 'updated_at',
'nullable' => false,
],
],
[
'Cycle\\ORM\\Entity\\Behavior\\Listener\\SoftDelete',
[
'field' => 'deleted_at',
],
],
],
Schema::TYPECAST_HANDLER => null,
],
'postTag' => [
Schema::ENTITY => 'App\\Blog\\Entity\\PostTag',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'Cycle\\ORM\\Select\\Repository',
Schema::DATABASE => 'default',
Schema::TABLE => 'post_tag',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'post_id' => 'post_id',
'tag_id' => 'tag_id',
],
Schema::RELATIONS => [],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'post_id' => 'int',
'tag_id' => 'int',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'tag' => [
Schema::ENTITY => 'App\\Blog\\Entity\\Tag',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Blog\\Tag\\TagRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'tag',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'label' => 'label',
'created_at' => 'created_at',
],
Schema::RELATIONS => [
'posts' => [
Relation::TYPE => Relation::MANY_TO_MANY,
Relation::TARGET => 'post',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::WHERE => [],
Relation::ORDER_BY => [],
Relation::INNER_KEY => ['id'],
Relation::OUTER_KEY => ['id'],
Relation::THROUGH_ENTITY => 'postTag',
Relation::THROUGH_INNER_KEY => 'tag_id',
Relation::THROUGH_OUTER_KEY => 'post_id',
Relation::THROUGH_WHERE => [],
'4' => null,
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'created_at' => 'datetime',
],
Schema::SCHEMA => [],
Schema::LISTENERS => [
[
'Cycle\\ORM\\Entity\\Behavior\\Listener\\CreatedAt',
[
'field' => 'created_at',
],
],
],
Schema::TYPECAST_HANDLER => null,
],
'client' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\Client',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\Client\\ClientRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'client',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'client_date_created' => 'client_date_created',
'client_date_modified' => 'client_date_modified',
'client_name' => 'client_name',
'client_address_1' => 'client_address_1',
'client_address_2' => 'client_address_2',
'client_city' => 'client_city',
'client_state' => 'client_state',
'client_zip' => 'client_zip',
'client_country' => 'client_country',
'client_phone' => 'client_phone',
'client_fax' => 'client_fax',
'client_mobile' => 'client_mobile',
'client_email' => 'client_email',
'client_web' => 'client_web',
'client_vat_id' => 'client_vat_id',
'client_tax_code' => 'client_tax_code',
'client_language' => 'client_language',
'client_active' => 'client_active',
'client_surname' => 'client_surname',
'client_avs' => 'client_avs',
'client_insurednumber' => 'client_insurednumber',
'client_veka' => 'client_veka',
'client_birthdate' => 'client_birthdate',
'client_gender' => 'client_gender',
],
Schema::RELATIONS => [],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'client_date_created' => 'datetime',
'client_date_modified' => 'datetime',
'client_active' => 'bool',
'client_birthdate' => 'datetime',
'client_gender' => 'int',
],
Schema::SCHEMA => [],
Schema::LISTENERS => [
[
'Cycle\\ORM\\Entity\\Behavior\\Listener\\CreatedAt',
[
'field' => 'client_date_created',
],
],
[
'Cycle\\ORM\\Entity\\Behavior\\Listener\\UpdatedAt',
[
'field' => 'client_date_modified',
'nullable' => false,
],
],
],
Schema::TYPECAST_HANDLER => null,
],
'clientCustom' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\ClientCustom',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\ClientCustom\\ClientCustomRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'client_custom',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'client_id' => 'client_id',
'custom_field_id' => 'custom_field_id',
'value' => 'value',
],
Schema::RELATIONS => [
'client' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'client',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'client_id',
Relation::OUTER_KEY => ['id'],
],
],
'custom_field' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'customField',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'custom_field_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'client_id' => 'int',
'custom_field_id' => 'int',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'clientNote' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\ClientNote',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\ClientNote\\ClientNoteRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'client_note',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'client_id' => 'client_id',
'date' => 'date',
'note' => 'note',
],
Schema::RELATIONS => [
'client' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'client',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'client_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'client_id' => 'int',
'date' => 'datetime',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'company' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\Company',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\Company\\CompanyRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'company',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'current' => 'current',
'name' => 'name',
'address_1' => 'address_1',
'address_2' => 'address_2',
'city' => 'city',
'state' => 'state',
'zip' => 'zip',
'country' => 'country',
'phone' => 'phone',
'fax' => 'fax',
'email' => 'email',
'web' => 'web',
'date_created' => 'date_created',
'date_modified' => 'date_modified',
],
Schema::RELATIONS => [],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'current' => 'int',
'date_created' => 'datetime',
'date_modified' => 'datetime',
],
Schema::SCHEMA => [],
Schema::LISTENERS => [
[
'Cycle\\ORM\\Entity\\Behavior\\Listener\\CreatedAt',
[
'field' => 'date_created',
],
],
[
'Cycle\\ORM\\Entity\\Behavior\\Listener\\UpdatedAt',
[
'field' => 'date_modified',
'nullable' => false,
],
],
],
Schema::TYPECAST_HANDLER => null,
],
'companyPrivate' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\CompanyPrivate',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\CompanyPrivate\\CompanyPrivateRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'company_private',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'company_id' => 'company_id',
'vat_id' => 'vat_id',
'tax_code' => 'tax_code',
'iban' => 'iban',
'gln' => 'gln',
'rcc' => 'rcc',
'date_created' => 'date_created',
'date_modified' => 'date_modified',
],
Schema::RELATIONS => [
'company' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'company',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'company_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'company_id' => 'int',
'gln' => 'int',
'date_created' => 'datetime',
'date_modified' => 'datetime',
],
Schema::SCHEMA => [],
Schema::LISTENERS => [
[
'Cycle\\ORM\\Entity\\Behavior\\Listener\\UpdatedAt',
[
'field' => 'date_modified',
'nullable' => false,
],
],
],
Schema::TYPECAST_HANDLER => null,
],
'customField' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\CustomField',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\CustomField\\CustomFieldRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'custom_field',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'table' => 'table',
'label' => 'label',
'type' => 'type',
'location' => 'location',
'order' => 'order',
],
Schema::RELATIONS => [],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'location' => 'int',
'order' => 'int',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'customValue' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\CustomValue',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\CustomValue\\CustomValueRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'custom_value',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'custom_field_id' => 'custom_field_id',
'value' => 'value',
],
Schema::RELATIONS => [
'custom_field' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'customField',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'custom_field_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'custom_field_id' => 'int',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'emailTemplate' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\EmailTemplate',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\EmailTemplate\\EmailTemplateRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'email_template',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'email_template_title' => 'email_template_title',
'email_template_type' => 'email_template_type',
'email_template_body' => 'email_template_body',
'email_template_subject' => 'email_template_subject',
'email_template_from_name' => 'email_template_from_name',
'email_template_from_email' => 'email_template_from_email',
'email_template_cc' => 'email_template_cc',
'email_template_bcc' => 'email_template_bcc',
'email_template_pdf_template' => 'email_template_pdf_template',
],
Schema::RELATIONS => [],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'family' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\Family',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\Family\\FamilyRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'family',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'family_name' => 'family_name',
],
Schema::RELATIONS => [],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'gentor' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\Gentor',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\Generator\\GeneratorRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'gentor',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'route_prefix' => 'route_prefix',
'route_suffix' => 'route_suffix',
'camelcase_capital_name' => 'camelcase_capital_name',
'small_singular_name' => 'small_singular_name',
'small_plural_name' => 'small_plural_name',
'namespace_path' => 'namespace_path',
'controller_layout_dir' => 'controller_layout_dir',
'controller_layout_dir_dot_path' => 'controller_layout_dir_dot_path',
'repo_extra_camelcase_name' => 'repo_extra_camelcase_name',
'paginator_next_page_attribute' => 'paginator_next_page_attribute',
'constrain_index_field' => 'constrain_index_field',
'filter_field' => 'filter_field',
'filter_field_start_position' => 'filter_field_start_position',
'filter_field_end_position' => 'filter_field_end_position',
'pre_entity_table' => 'pre_entity_table',
'modified_include' => 'modified_include',
'created_include' => 'created_include',
'updated_include' => 'updated_include',
'deleted_include' => 'deleted_include',
'keyset_paginator_include' => 'keyset_paginator_include',
'offset_paginator_include' => 'offset_paginator_include',
'flash_include' => 'flash_include',
'headerline_include' => 'headerline_include',
],
Schema::RELATIONS => [],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'filter_field_start_position' => 'int',
'filter_field_end_position' => 'int',
'modified_include' => 'bool',
'created_include' => 'bool',
'updated_include' => 'bool',
'deleted_include' => 'bool',
'keyset_paginator_include' => 'bool',
'offset_paginator_include' => 'bool',
'flash_include' => 'bool',
'headerline_include' => 'bool',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'gentorRelation' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\GentorRelation',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\GeneratorRelation\\GeneratorRelationRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'gentor_relation',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'lowercasename' => 'lowercasename',
'camelcasename' => 'camelcasename',
'view_field_name' => 'view_field_name',
'gentor_id' => 'gentor_id',
],
Schema::RELATIONS => [
'gentor' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'gentor',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'gentor_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'gentor_id' => 'int',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'group' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\Group',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\Group\\GroupRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'group',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'name' => 'name',
'identifier_format' => 'identifier_format',
'next_id' => 'next_id',
'left_pad' => 'left_pad',
],
Schema::RELATIONS => [],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'next_id' => 'int',
'left_pad' => 'int',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'inv' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\Inv',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\Inv\\InvRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'inv',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'client_id' => 'client_id',
'group_id' => 'group_id',
'user_id' => 'user_id',
'status_id' => 'status_id',
'is_read_only' => 'is_read_only',
'password' => 'password',
'time_created' => 'time_created',
'date_due' => 'date_due',
'number' => 'number',
'discount_amount' => 'discount_amount',
'discount_percent' => 'discount_percent',
'terms' => 'terms',
'url_key' => 'url_key',
'payment_method' => 'payment_method',
'creditinvoice_parent_id' => 'creditinvoice_parent_id',
'date_created' => 'date_created',
'date_modified' => 'date_modified',
],
Schema::RELATIONS => [
'user' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'user',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'user_id',
Relation::OUTER_KEY => ['id'],
],
],
'group' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'group',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => true,
Relation::INNER_KEY => 'group_id',
Relation::OUTER_KEY => ['id'],
],
],
'client' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'client',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => true,
Relation::INNER_KEY => 'client_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'client_id' => 'int',
'group_id' => 'int',
'user_id' => 'int',
'status_id' => 'int',
'is_read_only' => 'bool',
'time_created' => 'datetime',
'date_due' => 'datetime',
'discount_amount' => 'float',
'discount_percent' => 'float',
'payment_method' => 'int',
'creditinvoice_parent_id' => 'int',
'date_created' => 'datetime',
'date_modified' => 'datetime',
],
Schema::SCHEMA => [],
Schema::LISTENERS => [
[
'Cycle\\ORM\\Entity\\Behavior\\Listener\\CreatedAt',
[
'field' => 'date_created',
],
],
[
'Cycle\\ORM\\Entity\\Behavior\\Listener\\UpdatedAt',
[
'field' => 'date_modified',
'nullable' => false,
],
],
],
Schema::TYPECAST_HANDLER => null,
],
'invAmount' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\InvAmount',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\InvAmount\\InvAmountRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'inv_amount',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'inv_id' => 'inv_id',
'sign' => 'sign',
'item_subtotal' => 'item_subtotal',
'item_tax_total' => 'item_tax_total',
'tax_total' => 'tax_total',
'total' => 'total',
'paid' => 'paid',
'balance' => 'balance',
],
Schema::RELATIONS => [
'inv' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'inv',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'inv_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'inv_id' => 'int',
'sign' => 'int',
'item_subtotal' => 'float',
'item_tax_total' => 'float',
'tax_total' => 'float',
'total' => 'float',
'paid' => 'float',
'balance' => 'float',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'invCustom' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\InvCustom',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\InvCustom\\InvCustomRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'inv_custom',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'inv_id' => 'inv_id',
'custom_field_id' => 'custom_field_id',
'value' => 'value',
],
Schema::RELATIONS => [
'inv' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'inv',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'inv_id',
Relation::OUTER_KEY => ['id'],
],
],
'custom_field' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'customField',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'custom_field_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'inv_id' => 'int',
'custom_field_id' => 'int',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'invItem' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\InvItem',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\InvItem\\InvItemRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'inv_item',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'inv_id' => 'inv_id',
'tax_rate_id' => 'tax_rate_id',
'product_id' => 'product_id',
'task_id' => 'task_id',
'date_added' => 'date_added',
'name' => 'name',
'description' => 'description',
'quantity' => 'quantity',
'price' => 'price',
'discount_amount' => 'discount_amount',
'order' => 'order',
'is_recurring' => 'is_recurring',
'product_unit' => 'product_unit',
'product_unit_id' => 'product_unit_id',
'date' => 'date',
],
Schema::RELATIONS => [
'tax_rate' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'taxRate',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'tax_rate_id',
Relation::OUTER_KEY => ['id'],
],
],
'product' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'product',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => true,
Relation::INNER_KEY => 'product_id',
Relation::OUTER_KEY => ['id'],
],
],
'task' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'task',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => true,
Relation::INNER_KEY => 'task_id',
Relation::OUTER_KEY => ['id'],
],
],
'inv' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'inv',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'inv_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'inv_id' => 'int',
'tax_rate_id' => 'int',
'product_id' => 'int',
'task_id' => 'int',
'date_added' => 'datetime',
'quantity' => 'float',
'price' => 'float',
'discount_amount' => 'float',
'order' => 'int',
'is_recurring' => 'bool',
'product_unit_id' => 'int',
'date' => 'datetime',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'invItemAmount' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\InvItemAmount',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\InvItemAmount\\InvItemAmountRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'inv_item_amount',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'inv_item_id' => 'inv_item_id',
'subtotal' => 'subtotal',
'tax_total' => 'tax_total',
'discount' => 'discount',
'total' => 'total',
],
Schema::RELATIONS => [
'inv_item' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'invItem',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'inv_item_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'inv_item_id' => 'int',
'subtotal' => 'float',
'tax_total' => 'float',
'discount' => 'float',
'total' => 'float',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'invRecurring' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\InvRecurring',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\InvRecurring\\InvRecurringRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'inv_recurring',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'inv_id' => 'inv_id',
'start' => 'start',
'end' => 'end',
'frequency' => 'frequency',
'next' => 'next',
],
Schema::RELATIONS => [
'inv' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'inv',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'inv_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'inv_id' => 'int',
'start' => 'datetime',
'end' => 'datetime',
'next' => 'datetime',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'invTaxRate' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\InvTaxRate',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\InvTaxRate\\InvTaxRateRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'inv_tax_rate',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'inv_id' => 'inv_id',
'tax_rate_id' => 'tax_rate_id',
'include_item_tax' => 'include_item_tax',
'inv_tax_rate_amount' => 'inv_tax_rate_amount',
],
Schema::RELATIONS => [
'inv' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'inv',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'inv_id',
Relation::OUTER_KEY => ['id'],
],
],
'tax_rate' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'taxRate',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'tax_rate_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'inv_id' => 'int',
'tax_rate_id' => 'int',
'include_item_tax' => 'int',
'inv_tax_rate_amount' => 'float',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'itemLookup' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\ItemLookup',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\ItemLookup\\ItemLookupRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'item_lookup',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'name' => 'name',
'description' => 'description',
'price' => 'price',
],
Schema::RELATIONS => [],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'price' => 'float',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'merchant' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\Merchant',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\Merchant\\MerchantRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'merchant',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'inv_id' => 'inv_id',
'successful' => 'successful',
'date' => 'date',
'driver' => 'driver',
'response' => 'response',
'reference' => 'reference',
],
Schema::RELATIONS => [
'inv' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'inv',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'inv_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'inv_id' => 'int',
'successful' => 'bool',
'date' => 'datetime',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'payment' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\Payment',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\Payment\\PaymentRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'payment',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'payment_method_id' => 'payment_method_id',
'payment_date' => 'payment_date',
'amount' => 'amount',
'note' => 'note',
'inv_id' => 'inv_id',
],
Schema::RELATIONS => [
'inv' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'inv',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'inv_id',
Relation::OUTER_KEY => ['id'],
],
],
'payment_method' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'paymentMethod',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'payment_method_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'payment_method_id' => 'int',
'payment_date' => 'datetime',
'amount' => 'float',
'inv_id' => 'int',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'paymentCustom' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\PaymentCustom',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\PaymentCustom\\PaymentCustomRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'payment_custom',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'payment_id' => 'payment_id',
'custom_field_id' => 'custom_field_id',
'value' => 'value',
],
Schema::RELATIONS => [
'payment' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'payment',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'payment_id',
Relation::OUTER_KEY => ['id'],
],
],
'custom_field' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'customField',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'custom_field_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'payment_id' => 'int',
'custom_field_id' => 'int',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'paymentMethod' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\PaymentMethod',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\PaymentMethod\\PaymentMethodRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'payment_method',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'name' => 'name',
],
Schema::RELATIONS => [],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'product' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\Product',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\Product\\ProductRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'product',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'product_sku' => 'product_sku',
'product_name' => 'product_name',
'product_description' => 'product_description',
'product_price' => 'product_price',
'purchase_price' => 'purchase_price',
'provider_name' => 'provider_name',
'family_id' => 'family_id',
'tax_rate_id' => 'tax_rate_id',
'unit_id' => 'unit_id',
'product_tariff' => 'product_tariff',
],
Schema::RELATIONS => [
'family' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'family',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'family_id',
Relation::OUTER_KEY => ['id'],
],
],
'tax_rate' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'taxRate',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'tax_rate_id',
Relation::OUTER_KEY => ['id'],
],
],
'unit' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'unit',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'unit_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'product_price' => 'float',
'purchase_price' => 'float',
'family_id' => 'int',
'tax_rate_id' => 'int',
'unit_id' => 'int',
'product_tariff' => 'int',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'productCustom' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\ProductCustom',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\ProductCustom\\ProductCustomRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'product_custom',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'product_id' => 'product_id',
'custom_field_id' => 'custom_field_id',
'value' => 'value',
],
Schema::RELATIONS => [
'product' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'product',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'product_id',
Relation::OUTER_KEY => ['id'],
],
],
'custom_field' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'customField',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'custom_field_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'product_id' => 'int',
'custom_field_id' => 'int',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'profile' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\Profile',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\Profile\\ProfileRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'profile',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'company_id' => 'company_id',
'current' => 'current',
'mobile' => 'mobile',
'email' => 'email',
'description' => 'description',
'date_created' => 'date_created',
'date_modified' => 'date_modified',
],
Schema::RELATIONS => [
'company' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'company',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'company_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'company_id' => 'int',
'current' => 'int',
'date_created' => 'datetime',
'date_modified' => 'datetime',
],
Schema::SCHEMA => [],
Schema::LISTENERS => [
[
'Cycle\\ORM\\Entity\\Behavior\\Listener\\UpdatedAt',
[
'field' => 'date_modified',
'nullable' => false,
],
],
],
Schema::TYPECAST_HANDLER => null,
],
'project' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\Project',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\Project\\ProjectRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'project',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'client_id' => 'client_id',
'name' => 'name',
],
Schema::RELATIONS => [
'client' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'client',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'client_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'client_id' => 'int',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'quote' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\Quote',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\Quote\\QuoteRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'quote',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'inv_id' => 'inv_id',
'user_id' => 'user_id',
'client_id' => 'client_id',
'group_id' => 'group_id',
'status_id' => 'status_id',
'date_created' => 'date_created',
'date_modified' => 'date_modified',
'date_expires' => 'date_expires',
'number' => 'number',
'discount_amount' => 'discount_amount',
'discount_percent' => 'discount_percent',
'url_key' => 'url_key',
'password' => 'password',
'notes' => 'notes',
],
Schema::RELATIONS => [
'client' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'client',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => true,
Relation::INNER_KEY => 'client_id',
Relation::OUTER_KEY => ['id'],
],
],
'group' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'group',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => true,
Relation::INNER_KEY => 'group_id',
Relation::OUTER_KEY => ['id'],
],
],
'user' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'user',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'user_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'inv_id' => 'int',
'user_id' => 'int',
'client_id' => 'int',
'group_id' => 'int',
'status_id' => 'int',
'date_created' => 'datetime',
'date_modified' => 'datetime',
'date_expires' => 'datetime',
'discount_amount' => 'float',
'discount_percent' => 'float',
],
Schema::SCHEMA => [],
Schema::LISTENERS => [
[
'Cycle\\ORM\\Entity\\Behavior\\Listener\\CreatedAt',
[
'field' => 'date_created',
],
],
[
'Cycle\\ORM\\Entity\\Behavior\\Listener\\UpdatedAt',
[
'field' => 'date_modified',
'nullable' => false,
],
],
],
Schema::TYPECAST_HANDLER => null,
],
'quoteAmount' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\QuoteAmount',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\QuoteAmount\\QuoteAmountRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'quote_amount',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'quote_id' => 'quote_id',
'item_subtotal' => 'item_subtotal',
'item_tax_total' => 'item_tax_total',
'tax_total' => 'tax_total',
'total' => 'total',
],
Schema::RELATIONS => [
'quote' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'quote',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'quote_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'quote_id' => 'int',
'item_subtotal' => 'float',
'item_tax_total' => 'float',
'tax_total' => 'float',
'total' => 'float',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'quoteCustom' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\QuoteCustom',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\QuoteCustom\\QuoteCustomRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'quote_custom',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'quote_id' => 'quote_id',
'custom_field_id' => 'custom_field_id',
'value' => 'value',
],
Schema::RELATIONS => [
'custom_field' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'customField',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'custom_field_id',
Relation::OUTER_KEY => ['id'],
],
],
'quote' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'quote',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'quote_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'quote_id' => 'int',
'custom_field_id' => 'int',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'quoteItem' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\QuoteItem',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\QuoteItem\\QuoteItemRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'quote_item',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'quote_id' => 'quote_id',
'tax_rate_id' => 'tax_rate_id',
'product_id' => 'product_id',
'date_added' => 'date_added',
'name' => 'name',
'description' => 'description',
'quantity' => 'quantity',
'price' => 'price',
'discount_amount' => 'discount_amount',
'order' => 'order',
'product_unit' => 'product_unit',
'product_unit_id' => 'product_unit_id',
],
Schema::RELATIONS => [
'tax_rate' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'taxRate',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'tax_rate_id',
Relation::OUTER_KEY => ['id'],
],
],
'product' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'product',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'product_id',
Relation::OUTER_KEY => ['id'],
],
],
'quote' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'quote',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'quote_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'quote_id' => 'int',
'tax_rate_id' => 'int',
'product_id' => 'int',
'date_added' => 'datetime',
'quantity' => 'float',
'price' => 'float',
'discount_amount' => 'float',
'order' => 'int',
'product_unit_id' => 'int',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'quoteItemAmount' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\QuoteItemAmount',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\QuoteItemAmount\\QuoteItemAmountRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'quote_item_amount',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'quote_item_id' => 'quote_item_id',
'subtotal' => 'subtotal',
'tax_total' => 'tax_total',
'discount' => 'discount',
'total' => 'total',
],
Schema::RELATIONS => [
'quote_item' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'quoteItem',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'quote_item_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'quote_item_id' => 'int',
'subtotal' => 'float',
'tax_total' => 'float',
'discount' => 'float',
'total' => 'float',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'quoteTaxRate' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\QuoteTaxRate',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\QuoteTaxRate\\QuoteTaxRateRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'quote_tax_rate',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'quote_id' => 'quote_id',
'tax_rate_id' => 'tax_rate_id',
'include_item_tax' => 'include_item_tax',
'quote_tax_rate_amount' => 'quote_tax_rate_amount',
],
Schema::RELATIONS => [
'quote' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'quote',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'quote_id',
Relation::OUTER_KEY => ['id'],
],
],
'tax_rate' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'taxRate',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'tax_rate_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'quote_id' => 'int',
'tax_rate_id' => 'int',
'include_item_tax' => 'int',
'quote_tax_rate_amount' => 'float',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'setting' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\Setting',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\Setting\\SettingRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'setting',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'setting_key' => 'setting_key',
'setting_value' => 'setting_value',
],
Schema::RELATIONS => [],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'sumex' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\Sumex',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\Sumex\\SumexRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'sumex',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'invoice' => 'invoice',
'reason' => 'reason',
'diagnosis' => 'diagnosis',
'observations' => 'observations',
'treatmentstart' => 'treatmentstart',
'treatmentend' => 'treatmentend',
'casedate' => 'casedate',
'casenumber' => 'casenumber',
],
Schema::RELATIONS => [],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'invoice' => 'int',
'reason' => 'int',
'treatmentstart' => 'datetime',
'treatmentend' => 'datetime',
'casedate' => 'datetime',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'task' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\Task',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\Task\\TaskRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'task',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'project_id' => 'project_id',
'name' => 'name',
'description' => 'description',
'price' => 'price',
'finish_date' => 'finish_date',
'status' => 'status',
'tax_rate_id' => 'tax_rate_id',
],
Schema::RELATIONS => [
'tax_rate' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'taxRate',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'tax_rate_id',
Relation::OUTER_KEY => ['id'],
],
],
'project' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'project',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => true,
Relation::INNER_KEY => 'project_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'project_id' => 'int',
'price' => 'float',
'finish_date' => 'datetime',
'status' => 'int',
'tax_rate_id' => 'int',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'taxRate' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\TaxRate',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\TaxRate\\TaxRateRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'tax_rate',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'tax_rate_name' => 'tax_rate_name',
'tax_rate_percent' => 'tax_rate_percent',
'tax_rate_default' => 'tax_rate_default',
],
Schema::RELATIONS => [],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'tax_rate_percent' => 'float',
'tax_rate_default' => 'bool',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'unit' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\Unit',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\Unit\\UnitRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'unit',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'unit_name' => 'unit_name',
'unit_name_plrl' => 'unit_name_plrl',
],
Schema::RELATIONS => [],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'userClient' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\UserClient',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\UserClient\\UserClientRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'user_client',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'user_id' => 'user_id',
'client_id' => 'client_id',
],
Schema::RELATIONS => [
'user' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'user',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'user_id',
Relation::OUTER_KEY => ['id'],
],
],
'client' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'client',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'client_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'user_id' => 'int',
'client_id' => 'int',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'userCustom' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\UserCustom',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\UserCustom\\UserCustomRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'user_custom',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'user_id' => 'user_id',
'fieldid' => 'fieldid',
'fieldvalue' => 'fieldvalue',
],
Schema::RELATIONS => [
'user' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'user',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'user_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'user_id' => 'int',
'fieldid' => 'int',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
],
'userInv' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\UserInv',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\UserInv\\UserInvRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'user_inv',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'user_id' => 'user_id',
'type' => 'type',
'active' => 'active',
'date_created' => 'date_created',
'date_modified' => 'date_modified',
'language' => 'language',
'name' => 'name',
'company' => 'company',
'address_1' => 'address_1',
'address_2' => 'address_2',
'city' => 'city',
'state' => 'state',
'zip' => 'zip',
'country' => 'country',
'phone' => 'phone',
'fax' => 'fax',
'mobile' => 'mobile',
'email' => 'email',
'password' => 'password',
'web' => 'web',
'vat_id' => 'vat_id',
'tax_code' => 'tax_code',
'all_clients' => 'all_clients',
'salt' => 'salt',
'passwordreset_token' => 'passwordreset_token',
'subscribernumber' => 'subscribernumber',
'iban' => 'iban',
'gln' => 'gln',
'rcc' => 'rcc',
],
Schema::RELATIONS => [
'user' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'user',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'user_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'user_id' => 'int',
'type' => 'int',
'active' => 'bool',
'date_created' => 'datetime',
'date_modified' => 'datetime',
'all_clients' => 'bool',
'gln' => 'int',
],
Schema::SCHEMA => [],
Schema::LISTENERS => [
[
'Cycle\\ORM\\Entity\\Behavior\\Listener\\CreatedAt',
[
'field' => 'date_created',
],
],
[
'Cycle\\ORM\\Entity\\Behavior\\Listener\\UpdatedAt',
[
'field' => 'date_modified',
'nullable' => false,
],
],
],
Schema::TYPECAST_HANDLER => null,
],
'user' => [
Schema::ENTITY => 'App\\User\\User',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\User\\UserRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'user',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'login' => 'login',
'passwordHash' => 'password_hash',
'created_at' => 'created_at',
'updated_at' => 'updated_at',
],
Schema::RELATIONS => [
'identity' => [
Relation::TYPE => Relation::HAS_ONE,
Relation::TARGET => 'identity',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => ['id'],
Relation::OUTER_KEY => 'user_id',
],
],
'posts' => [
Relation::TYPE => Relation::HAS_MANY,
Relation::TARGET => 'post',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::WHERE => [],
Relation::ORDER_BY => [],
Relation::INNER_KEY => ['id'],
Relation::OUTER_KEY => 'user_id',
'4' => null,
],
],
'comments' => [
Relation::TYPE => Relation::HAS_MANY,
Relation::TARGET => 'comment',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::WHERE => [],
Relation::ORDER_BY => [],
Relation::INNER_KEY => ['id'],
Relation::OUTER_KEY => 'user_id',
'4' => null,
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'created_at' => 'datetime',
'updated_at' => 'datetime',
],
Schema::SCHEMA => [],
Schema::LISTENERS => [
[
'Cycle\\ORM\\Entity\\Behavior\\Listener\\CreatedAt',
[
'field' => 'created_at',
],
],
[
'Cycle\\ORM\\Entity\\Behavior\\Listener\\UpdatedAt',
[
'field' => 'updated_at',
'nullable' => false,
],
],
],
Schema::TYPECAST_HANDLER => null,
],
]; |
Specifically the product schema table: 'product' => [
Schema::ENTITY => 'App\\Invoice\\Entity\\Product',
Schema::MAPPER => 'Cycle\\ORM\\Mapper\\Mapper',
Schema::SOURCE => 'Cycle\\ORM\\Select\\Source',
Schema::REPOSITORY => 'App\\Invoice\\Product\\ProductRepository',
Schema::DATABASE => 'default',
Schema::TABLE => 'product',
Schema::PRIMARY_KEY => ['id'],
Schema::FIND_BY_KEYS => ['id'],
Schema::COLUMNS => [
'id' => 'id',
'product_sku' => 'product_sku',
'product_name' => 'product_name',
'product_description' => 'product_description',
'product_price' => 'product_price',
'purchase_price' => 'purchase_price',
'provider_name' => 'provider_name',
'family_id' => 'family_id',
'tax_rate_id' => 'tax_rate_id',
'unit_id' => 'unit_id',
'product_tariff' => 'product_tariff',
],
Schema::RELATIONS => [
'family' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'family',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'family_id',
Relation::OUTER_KEY => ['id'],
],
],
'tax_rate' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'taxRate',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'tax_rate_id',
Relation::OUTER_KEY => ['id'],
],
],
'unit' => [
Relation::TYPE => Relation::BELONGS_TO,
Relation::TARGET => 'unit',
Relation::LOAD => Relation::LOAD_PROMISE,
Relation::SCHEMA => [
Relation::CASCADE => true,
Relation::NULLABLE => false,
Relation::INNER_KEY => 'unit_id',
Relation::OUTER_KEY => ['id'],
],
],
],
Schema::SCOPE => null,
Schema::TYPECAST => [
'id' => 'int',
'product_price' => 'float',
'purchase_price' => 'float',
'family_id' => 'int',
'tax_rate_id' => 'int',
'unit_id' => 'int',
'product_tariff' => 'int',
],
Schema::SCHEMA => [],
Schema::TYPECAST_HANDLER => null,
], |
Schema looks OK. I was expecting a slightly different result from the inner/outer keys generator. Can you dump the entity before edit and after edit (before save)? Needed fields: |
This is a schema which I have pulled from rossaddison/yii-invoice which is a fork of yiisoft/demo. Specifically from runtime/schema.php generated by the rossaddison/yii-invoice fork once it is running as a result of using config/params.php
I was not sure how to initialize the schema using the https://github.com/cycle/schema-renderer, specifically the details between the square brackets.
Yii does the schema.php at runtime so I chose the above by simply copying the file from my runtime folder but I would still like to know how to do it through Cycle. |
Yes I believe the outer key should be without the square brackets ie. |
How do I dump the entity? |
i mean try to change $model->setTax_rate_id((int)$form->getTax_rate_id()); to $model->setTax_rate( Tax_rate ); to establish the relations |
It's OK. Yii3 uses the |
Ok, ran C:\wamp64\www\yii-invoice>yii cycle/schema and got the following.
|
There Also you should turn on the 'schema-providers' => [
// Uncomment next line to enable a Schema caching in the common cache
//\Yiisoft\Yii\Cycle\Schema\Provider\SimpleCacheSchemaProvider::class => ['key' => 'cycle-orm-cache-key'],
// Store generated Schema in the file
\Yiisoft\Yii\Cycle\Schema\Provider\PhpFileSchemaProvider::class => [
'mode' => \Yiisoft\Yii\Cycle\Schema\Provider\PhpFileSchemaProvider::MODE_READ_AND_WRITE,
'file' => 'runtime/schema.php',
],
\Yiisoft\Yii\Cycle\Schema\Provider\FromConveyorSchemaProvider::class => [
'generators' => [
// Cycle\Schema\Generator\SyncTables::class, // sync table changes to database
],
],
], |
Schema looks OK. We need to dump the Entity before changing and after it (before save). |
public function saveProduct(Product $model, ProductForm $form): void
{
dump($model); // <<< HERE
$model->setProduct_sku($form->getProduct_sku());
$model->setProduct_name($form->getProduct_name());
$model->setProduct_description($form->getProduct_description());
$model->setProduct_price($form->getProduct_price());
$model->setPurchase_price($form->getPurchase_price());
$model->setProvider_name($form->getProvider_name());
$model->setProduct_tariff($form->getProduct_tariff());
$model->setTax_rate_id((int)$form->getTax_rate_id());
$model->setUnit_id((int)$form->getUnit_id());
$model->setFamily_id((int)$form->getFamily_id());
dump($model); // <<< AND HERE
$this->repository->save($model);
} |
$dump_before
$dump_after
|
Using service:
Controller:
|
I only changed the relation keys ie. dropdown for family changed from Product to Service, ie. family_id changed from 1 to 2. The id's for all of the above are being correctly changed by the form and service. |
The service changes related entities ids in the Product but previous entities already loaded.
Can you try to make it consistent before save? $product->tax_rate = $taxRate_with_id3; |
Please can you use the forward slashes like // with a number after it eg. // 8 that I have put in the $dump_before and $dump_after at the end of each line in your comment above to understand you correctly. |
Sorry for being pedantic / picky/ fussy but I think you have a typo in your comment:
these should be <=> swopped. |
I included the following into the Service and Entitys to resolve this problem basically providing setRelation functions to balance the getRelation functions. It just means we can initialize these to null before the product is saved. Service
Entity
|
Ok the relations are saving now but new items added are experiencing an error. This is not going to be a quick solution. I have decided to create two separate functions in the service. One for adding and one for editing. This has solved my problem. I will leave this open for a while just in case. Nevertheless, thanks a million for your help roxblnfk. Thank you for your willingness and determination. |
Further reading: Here |
No duplicates 🥲.
What happened?
Ubuntu 22.04 LTS Testing and Wampserver 3.2.9 Testing
Above error common to both Windows and Ubuntu Apache2 using fork rossaddison/yii-invoice.
Event: A new product, not used in any quote, or invoice, when tax_rate_id BelongsTo dropdown edited and saved.
Also if the product's family group BelongsTo relation changes, and is saved, same error occurs.
This error occurs when the record is edited, not created.
This error did not occur when I was using annotations instead of the current Atributes. This issue is similar to issue #329
Here is the entity that is being used:
Version
The text was updated successfully, but these errors were encountered: