Skip to content

Integration of Laravel Telescope with Cycle ORM Using Laravel-Cycle-ORM-Adapter #471

Answered by lotyp
lotyp asked this question in Q&A
Discussion options

You must be logged in to vote

Update: Found my issue, had to define target as FQDN class-name:

#[ForeignKey(target: TelescopeEntry::class, innerKey: 'entry_uuid', outerKey: 'uuid', action: 'CASCADE')]

Current workaround:

Is to define property and add HasMany annotation to it:

<?php

declare(strict_types=1);

namespace WayOfDev\Cycle\Bridge\Telescope\Entities;

use Cycle\Annotated\Annotation\Column;
use Cycle\Annotated\Annotation\Entity;
use Cycle\Annotated\Annotation\ForeignKey;
use Cycle\Annotated\Annotation\Relation\HasMany;
use Cycle\Annotated\Annotation\Table\Index;
use Illuminate\Support\Collection;

#[Index(columns: ['entry_uuid', 'tag'])]
#[Index(columns: ['tag'])]
// #[ForeignKey(target: 'telescope_entries', …

Replies: 1 comment

Comment options

lotyp
Mar 21, 2024
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by roxblnfk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant