Skip to content

feat: not persist reverse relation when withoutPersisting() mentioned#1116

Draft
mpiot wants to merge 1 commit into
zenstruck:2.xfrom
mpiot:fix-without-persisting
Draft

feat: not persist reverse relation when withoutPersisting() mentioned#1116
mpiot wants to merge 1 commit into
zenstruck:2.xfrom
mpiot:fix-without-persisting

Conversation

@mpiot

@mpiot mpiot commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

try to fix #1100

On reverse relation, if the user explicitly add withoutPersisting(), do not persist.

and use #1104 to call adders ?

@mpiot mpiot force-pushed the fix-without-persisting branch from 368afd7 to 6849117 Compare April 24, 2026 12:28
@mpiot mpiot force-pushed the fix-without-persisting branch from 6849117 to d9023e1 Compare April 24, 2026 12:34
@nikophil

nikophil commented May 4, 2026

Copy link
Copy Markdown
Member

hey @mpiot

thanks for this. Could you add a test for the problem this PR solves? so that we won't have any regression

BTW, I've fixed the CI, you'll be able to rebase on 2.x once this PR is merged

@mpiot

mpiot commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

@nikophil I'm looking for create a test about it, just a question about the behavior:

  • Factory A
    • Factory B
    • Factory C->withoutPeristing() <= Not managed by Foundry for persisting
      • FactoryD <= Actually: Not managed by Foundry for persisting (because the previous is withoutPeristing)

If we want to manage FactoryD with Foundry, we need to use create, I don't know if this is a correct behavior (cascading the withoutPeristing or not).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Cascade persist order

2 participants