Skip to content

Add exclude_from_fixture_relationships check in ManyManyThroughFields#34

Merged
chrispenny merged 2 commits intochrispenny:mainfrom
Jianbinzhu:fix/add-exclude-check-for-many-many
Mar 29, 2026
Merged

Add exclude_from_fixture_relationships check in ManyManyThroughFields#34
chrispenny merged 2 commits intochrispenny:mainfrom
Jianbinzhu:fix/add-exclude-check-for-many-many

Conversation

@Jianbinzhu
Copy link
Copy Markdown
Contributor

When generating fixtures of site config, it does not exclude Member and Groups.

Added the exclude_from_fixture_relationships check for many_many relations.

Comment thread src/Service/FixtureService.php Outdated
Comment on lines +546 to +553
// Check to see if this class has requested that it not be included in relationship maps
$excludeClass = Config::inst()->get($relatedObject->ClassName, 'exclude_from_fixture_relationships');

// Yup, exclude this class
if ($excludeClass) {
continue;
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I'm trying to decide if we need this.

My gut feeling is that there is no harm in tracking this as a resolved relationship.

@chrispenny chrispenny force-pushed the fix/add-exclude-check-for-many-many branch from 735ab5e to f363d27 Compare March 29, 2026 22:23
@chrispenny chrispenny merged commit 73c689b into chrispenny:main Mar 29, 2026
9 checks passed
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.

2 participants