-
Notifications
You must be signed in to change notification settings - Fork 35
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
Referrer relations exception #33
Comments
This should actually be handled by this code: https://github.com/propelorm/Propel3/blob/master/src/Propel/Generator/Builder/Om/Component/RelationTrait.php#L182: 'By' should be automatically added at the referring relation name from the
Also building of the schema.xml should actually already work. Did we get a regression somewhere? All schemas in the fixtures worked for me in the latest versions |
Oh, it's true! I don't know if there's a regression somewhere: the |
Oh shit, true. https://github.com/propelorm/Propel3/blob/master/src/Propel/Generator/Model/Relation.php#L187 This is the issue. Outside code thinks it can return null for |
Closed via #34 |
In our test suite, at https://github.com/propelorm/Propel3/blob/master/tests/Fixtures/bookstore/schema.xml#L61 we have 2 references to
author
table. So, inAuthorEntityMap
we have 2 referrer relations namedessays
, which causes the following exception:Propel\Generator\Exception\EngineException: A relation with the name essays already exists in Propel\Tests\Bookstore\Author
.In Propel2 we don't have this issue, because the name of the relation is built on the foreign key name, which is unique.
Should we make the name unique or should we accept more then one relation with the same name?
The text was updated successfully, but these errors were encountered: