Skip to content
This repository was archived by the owner on Jan 8, 2026. It is now read-only.
This repository was archived by the owner on Jan 8, 2026. It is now read-only.

How to add OneToOne mapping between user and user_one #140

@Holicz

Description

@Holicz

Hello, I have installed and configured this bundle and I am currently stucked at this.

I have User class with this properties:
ID (e.g. a1f6e80c-e342-11e6-8657-d144e2a286b5 - UUID)
...
type (e.g. user_one)

And I want to achieve this with User class
ID
...
user_one (ID of record in user_one table)
user_two (NULL, if user is of type user_one)
type (e.g. user_one)

Why I want to do this? Because now, when I want to read user_one I must bind it from database by ID. If I would have it as I show in the second example I could do simply this in twig:

{{ app.user.user_one.name }}

Is this possible and how? Sorry for my bad english...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions