Skip to content

TASK: Also read property names from annotations#3559

Open
sorenmalling wants to merge 1 commit into
neos:9.2from
sorenmalling:3558-property-names-by-annotation
Open

TASK: Also read property names from annotations#3559
sorenmalling wants to merge 1 commit into
neos:9.2from
sorenmalling:3558-property-names-by-annotation

Conversation

@sorenmalling

Copy link
Copy Markdown
Contributor

When collecting id properties for join columns
also read properies annotated with the Id
mapping from Doctrine ORM

resolved: #3558

Review instructions

Create a model A with a relation to another model B.

Before the patch:
The model B must have the @Id tag to a property.

After the patch:
The model B can now use [ORM\Id] annotation

The property is now considered a ID Property

When collecting id properties for join columns
also read properies annotated with the Id
mapping from Doctrine ORM

Resolves: neos#3558
@mhsdesign

Copy link
Copy Markdown
Member

Hej, thanks for your fix - Im not deep enough in that but i think even if i were i would have following questions:

  • i though we had Neos\Flow\Annotations\Identity as replacement for ORM\ID
  • i cannot really fully grasp the implications without a new tests ^^
  • isnt this a bugfix and should target the lowest version?

@sorenmalling

Copy link
Copy Markdown
Contributor Author
  • i though we had Neos\Flow\Annotations\Identity as replacement for ORM\ID

The used annotation is not really relevant here. F
If you use annotation instead of var tags for that it would not be read either

  • i cannot really fully grasp the implications without a new tests ^^

Is it a wish or requirement? Where should it be placed?

  • isnt this a bugfix and should target the lowest version?

Agree, its more of s bugfix

@mhsdesign
mhsdesign requested a review from kitsunet May 26, 2026 06:31
@mhsdesign

Copy link
Copy Markdown
Member

Hi, i found that there are several tests already using @ORM\Id annotation but there have been none for @id or #[ORM\ID]

The reason @ORM\Id works even if we are only reading tags, is that the namespace is trimmed and we could have been writing @Nudelsuppe\Id see test 0323dfb

id say add extend one in Neos.Flow/Tests/Functional/Persistence/Fixtures and copy a @ORM\Id definition and add a #[ORM\ID] :)

And this now definitely qualifies as bugfix to the lowest version which attempts to actually provide orm attributes in flow :)

@mficzel

mficzel commented Jun 5, 2026

Copy link
Copy Markdown
Member

And this now definitely qualifies as bugfix to the lowest version which attempts to actually provide orm attributes in flow :)

That would be 8.4 i think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: FlowAnnotationDriver does not support ID attribute

3 participants