Skip to content
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

fix: pass join column options to FK #11499

Open
wants to merge 4 commits into
base: 3.3.x
Choose a base branch
from

Conversation

vencakrecl
Copy link

@vencakrecl vencakrecl commented Jun 14, 2024

Summary

Pass options to FK because of \Doctrine\DBAL\Platforms\PostgreSQLPlatform::getAdvancedForeignKeyOptionsSQL

How to use

#[ORM\JoinColumn(name: 'customer_id', options: ['deferrable' => true, 'deferred' => true])]

@vencakrecl vencakrecl force-pushed the join-column-option branch 2 times, most recently from 2c0eb61 to fa25d4b Compare June 14, 2024 11:20
@derrabus
Copy link
Member

Thank you. Can you please add a functional test that actually creates such a foreign key?

@derrabus derrabus changed the base branch from 3.2.x to 3.3.x June 18, 2024 12:26
@derrabus derrabus changed the base branch from 3.3.x to 3.2.x June 18, 2024 12:27
@vencakrecl
Copy link
Author

vencakrecl commented Jun 18, 2024

@derrabus done, see f68b5e3

@derrabus
Copy link
Member

No, your test compares the generated SQL. But that SQL still does not hit a database.

@vencakrecl
Copy link
Author

@derrabus If I understood, should I add the test \Doctrine\Tests\ORM\Functional\SchemaTool\PostgreSqlSchemaToolTest here?

@derrabus
Copy link
Member

Sounds about right to me. 🙂

@derrabus derrabus changed the base branch from 3.2.x to 3.3.x June 19, 2024 10:42
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.

None yet

2 participants