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

Add cascade annotation option support in ClassSourceManipulator #1323

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

trislem
Copy link

@trislem trislem commented Jun 8, 2023

Allow adding the cascade annotation option for OneToMany, ManyToOne and ManyToMany relation in ClassSourceManipulator.
The OneToOne remains forced to ['persist', 'remove']

Related issue : #1316

Copy link
Member

@weaverryan weaverryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see a few extra changes in here, but the meat of this looks good

},
"require-dev": {
"composer/semver": "^3.0",
"dbrekelmans/bdi": "dev-main",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are any of these changes necessary?

@@ -11,7 +11,7 @@
>
<php>
<ini name="error_reporting" value="-1" />
<env name="TEST_DATABASE_DSN" value="mysql://root:root@127.0.0.1:3306/test_maker?serverVersion=5.7" />
<env name="TEST_DATABASE_DSN" value="mysql://root:root@mariadb:3306/test_maker?serverVersion=5.7" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert this :)

isNullable: true,
cascade: ['persist'],
),
];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove the many_to_many and one_to_one test cases. It's enough to make sure that a "singular" and "collection" relationship are tested.

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

Successfully merging this pull request may close these issues.

None yet

2 participants