Skip to content
This repository has been archived by the owner on Mar 30, 2018. It is now read-only.

Identity though foreign entities (@id on associations) - conflicting statements in documentation #36

Open
calumbrodie opened this issue Jul 27, 2011 · 2 comments

Comments

@calumbrodie
Copy link
Contributor

http://www.doctrine-project.org/docs/orm/2.0/en/tutorials/composite-primary-keys.html#identity-through-foreign-entities.

Under this section it states that

'Set a key associationKey: with the field name of the association in YAML.'

And in the code example (for Yaml) it shows

      associationKey: true

The first statement makes it look as if you can choose a field from your associated entity to use as the primary key for the entity you are mapping - while the second example looks as if you are forced to use the primary Id of the associated entity.

I'm not sure which is correct but they cannot both be.

-Thanks

@calumbrodie
Copy link
Contributor Author

After having a look through the code that relates to this feature - I'm seems like just changing the following would clear this up.

'Set a key associationKey: with the field name of the association in YAML.'

to

'Set a key associationKey: with the value true .'

@android-leha
Copy link

Please, insert example of YAML in the doc

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants